Set compare at price as old price on price change in Shopify by using Arigato Automation
Automatically set the variant's compare at price to the previous price every time the price changes.
This automation is fired every time a product is updated. It checks to see if the price has changed and if the price has changed, sets the previous price as the compare_at_price. To achieve this, the automation uses a database value to cache the current value. The cached value is set to the compare_at_price and sets the new price to the cache on price change.
Protips: To get correct results for all the price changes, run the workflow for all your products on-demand for the first time to set the cache value.