*** Google Automated Discounts for WooCommerce Changelog *** 2024-01-29 - version 1.5.0 * New: Added a new, automatic discount banner that shows up on product pages if the product is in an AD session. * New: Added debug reporting features. * Tweak: Variation Discount Inheritance Type is now percentage as default. * Tweak: Renamed the sgadwc_percent_discount_variation_array_max_length filter to sgadwc_discount_variation_array_max_length. * Tweak: Implemented a safeguard for variation discount inheritance when COGS is set on a variation. It will prevent the discount from being inherited if the COGS is higher than the inherited price. * Fix: Fixed logging stat logging for orders that don't contain AD products. 2024-01-21 - version 1.4.1 * Tweak: Added a filter to make sure that the WooCommerce customer sessions last at least 48 hours, since that is an AD requirement. * Tweak: A few minor improvements to the rendering of the discount badge. * Fix: Fixed a bug where the AD price would not persist in the cart during the required 48 hours after a product was added during a valid AD product session. 2024-01-16 - version 1.4.0 * New: Variations can inherit the discount from the first variation that has an AD price. * New: New order statistics that show the number of orders that were created during an AD session. * New: Added the global function sgadwc_is_product_in_discount_session(PRODUCT_ID) that returns true if the product is in an AD session. * Tweak: In order list show bw badge next to orders that were created during an AD session but don't contain order items discounted by AD. * Tweak: Bumped up WC version compatibility to 8.5 * Tweak: Bumped up WP version compatibility to 6.4 * Tweak: Updated vendor libraries. * Tweak: Declared Cart and Checkout Blocks compatibility. 2023-10-09 - version 1.3.0 * New: Added order infos on the order list page and the order edit page. * Tweak: Added AD info on order list and single order edit pages. * Tweak: Added a warning if transients are disabled. * Tweak: Added a filter with which products for testing can be specified. * Fix: Fixed processing variable attribute names with special characters. 2023-10-02 - version 1.2.4 * Tweak: Only update the calculated min price if it changed. * Tweak: Only delete product transients on manual product changes or if the calculated min price changed. * Tweak: Don't add a calculated min price if it is the same as the regular price. * Tweak: Updated vendor libraries * Tweak: Added filter to adjust the look back days for the statistics table. * Tweak: Declared HPOS compatibility. * Tweak: Removed one unnecessary statistics column * Tweak: Improved filters for simple and variable product price retrieval * Tweak: Added console log if an AD session is active to help with debugging. * Tweak: Random testing prices are now below the regular price and (if set) below the sale price. * Tweak: Add or update sale prices. This will automatically show strike-through prices (if the theme supports it). * Fix: Fixed specific variation price output 2023-05-16 - version 1.2.3 * Fix: Fixed the timestamp for the local timezone for the automatic min price calculation. 2023-05-14 - version 1.2.2 * Tweak: Reload the same admin settings tab after saving the settings. * Tweak: When clicking the browser back button, go back to the previous tab. * Tweak: Added UX feedback for shop manager on the manually triggered regeneration batch. 2023-05-12 - version 1.2.1 * Tweak: Safeguard to not run the automatic min price calculation during order creation. 2023-05-12 - version 1.2.0 * New: Setting for manual override logic 2023-05-11 - version 1.1.0 * New: Google Auto Pricing Min Price settings. * Tweak: Replaced a warning output in the debut info. * Tweak: WC 7.7 compatibility. 2023-04-19 - version 1.0.10 * Tweak: Updated plugin URI. * Tweak: Removed AdsBot click count from valid clicks. * Tweak: Added a support page with debug information. * Tweak: Made the tabs sticky on reload. * Tweak: Added user_agent and ip to log download. * Tweak: WP 6.2 compatibility. * Tweak: WC 7.6 compatibility. * Tweak: Separated stats into its own tab. 2023-03-30 - version 1.0.9 * Fix: Another correction for the check if WC is active. 2023-03-30 - version 1.0.8 * Tweak: Enabled the logger for invalid variable products on AD requests. * Fix: Corrected the check if WC is active. 2023-03-28 - version 1.0.7 * Tweak: Temporarily disabled the logger for invalid variable products. * Tweak: Refactored some code into the Helpers class. * Fix: Fixed a function call to an undefined function. * Fix: Fixed the source location for admin.min.js 2023-03-27 - version 1.0.6 * Tweak: Updates to match wc.com requirements. 2023-03-26 - version 1.0.5 * New: Added countdown div to the discount. * Tweak: Bumped up WP version compatibility to 6.2 * Tweak: Bumped up WC version compatibility to 7.5 * Tweak: Added logging for user_agent and ip. * Tweak: Refactored CSS setup. 2023-02-04 - version 1.0.4 * Tweak: Limit stats to 10'000 entries. * Tweak: Added Googles public key to the default options. * Tweak: Removed setting for the public key. * Tweak: Added more logging for token expiration errors. * Tweak: Process stats in WP timezone. * Tweak: Avoid to re-initiate session on subsequent clicks of the same token for the same visitor. * Tweak: Added workaround if a WP install plugin or theme loads a very old Composer version that doesn't contain the setApcuPrefix function. * Tweak: Implemented lod download as csv. * Tweak: Changed output source for errors. * Tweak: Put debug info behind flag. 2023-01-15 - version 1.0.3 * New: Added new stats section. 2023-01-10 - version 1.0.2 * Tweak: Added payload logger 2022-12-06 - version 1.0.1 * Tweak: Safeguard when no session has been set yet and trying to return prices. 2022-12-01 - version 1.0.0 * Tweak: Initial public release 2022-11-28 - version 0.1.0 * New: Initial release