Skip to main content

Limitations

Here's a list of limitations that we are aware of.

Retrieving Product Data through the REST API

If you are using a theme or plugin (eg. product filter) that retrieves product data through the WooCommerce REST API, you need to adjust the code to retrieve the prices discounted through Automated Discounts.

By default the WooCommerce REST API can't return discounted prices of products that are in an Automated Discounts session.

To make the WooCommerce REST API much faster and efficient, it doesn't load many of the WooCommerce functions, including the WooCommerce session handler. That's why during a REST API call WooCommerce can't determine if a product is in an Automated Discounts session and thus can't return the discounted prices.

Here's a comment of a WooCommerce developer on this topic: REST API doesn't load all the theme code

He outlines a way how to load the WooCommerce session handler during a REST API call.

Another approach is to request the product data through a WordPress AJAX call. The WooCommerce session handler is loaded during an AJAX call. However, there is no standardized way to retrieve product data through an AJAX call. You would need to write your own AJAX handler (backend and frontend) and return the product data in the response.

Because both approaches highly depend on how the theme or plugin is coded, we can't provide a standardized solution for this from our side.

Boost your sales with Google Shopping ads. Allow Google to set your discount to secure the sale and optimize your profit margin.