Testing
Google's Testing Procedure
Google will guide you through the setup step-by-step. At one point, it will generate links with which you can test and see if automated discounts work on your website.
Set product IDs to test
The plugin also provides automatic testing links, with randomly generated discounted prices. You can find them in the plugin settings.
Use the following filter to set the specific product IDs that you want to test.
add_filter( 'sgadwc_testing_product_ids', function ($product_ids) {
$product_ids[] = 123; // Add your product IDs here
$product_ids[] = 456;
$product_ids[] = 789;
return $product_ids;
} );
Console Debug Messages
When testing with the internal testing links, you can see debug messages in the browser console. This will help you understand what is happening behind the scenes.
It will show information if the Automated Discount session could be started and the payload that is processed.
It will also show error details if something goes wrong, such as when the product ID is not found.