Support » Plugin: OnSale Page for WooCommerce » Scheduled sales not supported

  • Resolved Kokomo

    (@kokomoweb)


    Hi,

    Unfortunately the plugin displays all products that have a sale price instead of checking if the scheduled sale has completed.

    For example, I had a sale scheduled (using the default woocommerce sale schedule) until the 31st of may, but since woocommerce doesn’t clear the sale price in the product once the sale is over, your plugin still displays the products when the sale is over.

    You should have a function that checks the current date and compares it to the scheduled date

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpgenie2

    (@wpgenie2)

    Hi, we are using WooCommerce function wc_get_product_ids_on_sale() to get all product ids on sale and then using it in query with ‘post__in’.
    WooCommerce set ‘wc_products_onsale’ transient for the first time this function is called an use it for nex 30 days. Every day at 00:00 WooCommerce runs woocommerce_scheduled_sales which checks for sales which are due to end or start and delete transient ‘wc_products_onsale’ if there are such products.

    So your problem is in that transient ‘wc_products_onsale’ and why it isn’t cleared with woocommerce_scheduled_sales.

    hope this helps.

    Thank-you, it seems my cron was just out of wack, I trigerred it manually using “wp Crontrol” and it worked as expected.

    • This reply was modified 4 months, 1 week ago by  Kokomo.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.