Skip to main content

Troubleshooting

Viewing the Error Logs

The plugin outputs errors into the regular WooCommerce log directory. It is accessible by clicking on the View Logs link in the plugin's settings window and choosing the most recent log with the slug sgadwc. It will show all errors that it encountered. If you don't find a log with the slug sgadwc it means that no errors have been encountered.

The website still shows cached prices, even if a valid discount has been successfully received

It is likely your caching rules are too aggressive.

Make sure to exclude caching if the URL query parameter pv2 is present in the URL.

Example: https://example.com/socks/?pv2=1234

You also must ensure that caching is disabled as soon as a WooCommerce session is active. (Typically a WooCommerce session is created when a visitor adds a product to the cart.)

Make sure that the cache is disabled if at least one of the following server-side WooCommerce cookies has been set:

  • woocommerce_cart_hash
  • woocommerce_items_in_cart
  • wp_woocommerce_session_ (This cookie always attaches a session ID at the end. Make sure that the match is not set to exact but will match any cookie which contains that cookie string.)

Caching

In general 99% of all incompatibilities are caused by caching.

There are two conditions that need to be met for Automated Discounts to work correctly:

  • When the URL query parameter pv2 is present in the URL, caching must be disabled.

  • WooCommerce sessions must be properly handled by the caching system. Neither page cache, nor server object cache, or any other caching layer should cache pages when a WooCommerce session is active.

Known Incompatibilities

We have come across an install that uses Object Cache Pro (by Rhubarb Group), FlyingPress (by FlyingWeb) and the Astra Pro theme (by Brainstorm Force). Any one of these plugins or themes, or a combination of them, causes Automated Discounts to not work correctly because parts of the output get cached, including Ajax requests.

While FlyingPress may be configured to exclude caching, the other two plugins don't offer a way to exclude caching for specific URLs or WooCommerce sessions.

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