The issue is that you’re attempting to store output of a method by reference to $starredgroup_products
, which is not possible.
This should fix it (untested):
$starredgroup = $myPage->getGroup( $starredgroup );
$starredgroup_id = $starredgroup['groupid'];
$starredgroup_products = $myPage->getStarredProducts( $starredgroup_id );
Related Posts:
- Why is WordPress code so “space-happy”?
- Sandwich Coding Standards
- Why does WordPress reverse conditional statements?
- spaces inside parenthesis
- Exit or die in main plugin file breaking php standards recommendation
- How could I better initialize a method from my class?
- $wpdb->prepare referencing a const without a coding guideline warning
- Why isn’t WordPress part of Framework Interop Group?
- How to name files of namespaced classes?
- When to use Exceptions vs Error Objects vs just plain false/null
- Actions, functions and conditionals
- WordPress and event-driven programming – what is it about?
- How should I document function calls?
- PHP Coding Standards, Widgets and Sanitization
- how to escape wp_oembed_get for phpcs
- Avoiding “Usage of a direct database call is discouraged”
- Using global $post v/s $GLOBALS[‘post’]
- Nonce in settings API with tabbed navigation
- What to do when theme and WordPress coding standards conflict?
- WP Coding standards – escaping the inescapable?
- What is WordPress file encoding?
- How Flexible are the WordPress Coding Standards for PHPCS?
- Correct processing of `$_POST`, following WordPress Coding Standards
- How to set up phpcs with WordPress coding standard with PHP8?
- Are we allowed to use the Allman (BSD) indent style when coding WordPress plugins and themes?
- Hyphens instead of Underscores in Post-type Archive Template Filenames when Post-type handle contains underscore
- Can I use namespaces in my plugin?
- PHPCS: Strings should have translatable content
- Assignments must be the first block of code on a line Validation Error on Travis
- WordPress mode for emacs?
- Is it better to create a function or a variable for current_theme_supports?
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Strange glyphs code error
- Should I check for privileges before hooking into `wp_ajax_$handle` or after?
- Add comments for template variables
- What’s the best practice way of handling custom fields in different post formats?
- What make possible unit test plugins?
- REQUIRED: Could not find wp_link_pages. See: wp_link_pages by Theme Checker
- Translate a Constant while appeasing WordPress PHPCS
- Do define() statements need phpDocumentor-style docblocks?
- Why the WP Core team does not allow filter_* functions? [closed]
- WordPress Theme Validator?
- Understanding how the class family `inner-container` works
- Class or function wrapper for plugin code
- Is there a common structure for a wordpress formular?
- Check if almost 10 year old – working code is up to date
- Should I use wp_cache in my plugin to make it faster?
- WP nonce verification
- Standard technique for AJAX post endpoint: WP REST or WP API?
- PHP Code Sniffer – WordPress VIP Coding Standards
- Sanitization html output itself
- How to automatically convert “normal” conditions to yoda conditions
- How can one use variables in a template or template part without polluting the global scope?
- May I know where to edit the tax rate?