• Resolved SandyRig

    (@sandyrig)


    My client wants to show best selling items on collection pages so I set the popularity to default in customizer. But now he wants to show best selling from last 30 days and not all time.

    Is there a way to apply this limit. I have searched the internet and found nothing. I have gone through wp_query documentation too but there is no setting to set any limit along with 'key'=>'total_sales'

Viewing 1 replies (of 1 total)
  • Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @sandyrig,

    Thank you for reaching out.

    WooCommerce doesn’t have a built-in feature to limit the best-selling products to the last 30 days out of the box. The ‘total_sales’ meta key you referred to counts all sales ever made for a product, not within a specific time frame.

    However, this could be achieved with custom coding. I would recommend the following:

    1. Running the exact question you’re asking, through an AI platform like ChatGPT for recommendations.
    2. Checking whether there are existing plugins that might be doing that already. A quick search pointed out some good candidates.
    3. Joining our WooCommerce Slack community (it does have a developer channel where you can ask coding questions): https://woo.com/community-slack/

    Hope it helps!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.