Skip Navigation

[Resolved] How to List Children of Woocommerce Grouped product

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 3 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#1684665

I'm trying to create a simple list of the children of a Woocommerce Grouped product with the prices next to them.
I'm trying to do this so we have control over displaying the prices to only people that are logged in

Post ID filter get_children seems to list every product not just the children of the grouped product
Any direction to speed things up would be appreciated

#1685433

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

According to the following StackOverflow answer, it seems that the children's products of grouped products are stored in a custom field.
https://stackoverflow.com/a/52249366

I did not confirm how are these IDs saved in the custom field(IDs separated by (,) or maybe a serialized array). But I think the most straight forward solution would be to create a custom shortcode in your theme's functions.php file, that will return the IDs separated by a comma(,) and you can pass them to a view with the shortcode argument 'ids':

[wpv-view name="your-view" ids='[your-custom-shortcode product='[wpv-post-id]']']

I hope this helps. Let me know if you still have any questions.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.