Your cart is currently empty!
Groups, woo, and foosales
—
by
Hi,
We use Groups with WooCommerce and FooSales. FooSales is a point-of-sale plugin that makes calls to the WooCommerce API to get products, customers, and create orders.
Up until a few months ago, this all worked as expected: the user that logs into the FooSales point of sale would be able to retrieve products that they had access to according to their Group restrictions.
However, sometime in the last few months this stopped working. Now, only products that have no group restriction (ie. that are publicly available / unrestricted by Group) show up in the FooSales product list. Note that products still show up on the web site front end and in the WooCommerce back end as expected.
This behaviour extends even to administrator users: they only see public, unrestricted products.
I emphasize that in the past, this worked absolutely as expected: whoever the logged in user was in FooSales would see products listed according to their Group entitlements, and administrator users would of course see all products.
We’ve talked with the FooSales plugin developers and of course they are pointing to Groups as the problem. They say that basically they are using standard WordPress and WooCommerce REST APIs and that any issues with retrieving products must be coming from Groups.
How can we debug or troubleshoot this? Is there extra debug logging we can enable for what Groups is doing? We have the standard WordPress debug.log enabled but it doesn’t show anything that seems relevant.
Thank you
Comments
One response to “Groups, woo, and foosales”
Hi Richard,
Welcome to our support forum for Groups and its addons.
The main concept behind Groups is the following:
– Visitors can see posts/posttypes that are not restricted to any group.
– Users can see posts/posttypes that are not restricted to any group and those that are restricted to group(s) they are members of.
According to your ticket description that your setup used to work up until a few months ago and since it is still working outside of FooSale POS, then the best option for you would be to check how does FooSale retrieve products and if each of the products should be visible to the current user. Adding to that, is the current user on FooSale a WP_User, or does FooSale handle users with a different approach?
Since FooSale support mentioned that they use the standard WP, WC API, then they should provide you with further details on their implementation where you can add traces and check what Groups determines for each product, for example via https://github.com/itthinx/groups/blob/master/lib/extra/class-groups-extra.php#L52.
Last but not least, since this didn’t occur since you first used that setup, then it could also be useful if you check the changelogs for related changes in implementation of FooSale.
Kind regards,
George
Only authorized members can comment on this topic.
Log in