Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: /products parameter "on_sale" doesn't retrieve variations on sale #15

mateuszgwozdz opened this issue Jun 24, 2019 · 1 comment


Copy link

@mateuszgwozdz mateuszgwozdz commented Jun 24, 2019

Describe the bug
"on sale" paramter from [](products list endpoint), doesn't show variable products that are on sale

To Reproduce
Steps to reproduce the behavior:

  1. Create a variable product, add an attribute and a variation.
  2. Set variation price and sale price to lower than regular price.
  3. Using PHP library, query products list endpoint and include "on_sale" parameter as true. The product you just added will not be returned, even though it is on sale.

Expected behavior
on_sale parameter should show variable products when they are on sale.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

WooCommerce version:   3.6.2
Log directory writable:   /vagrant/html/fineyellow/wp-content/uploads/wc-logs/
WordPress version:   5.0.4 - There is a newer version of WordPress available (5.2.2)
WordPress multisite:  
WordPress memory limit:   1 GB
WordPress debug mode:    
WordPress cron:    
Language:   en_GB
External object cache:  
mateuszgwozdz referenced this issue in woocommerce/woocommerce Jun 24, 2019
@claudiosanches claudiosanches transferred this issue from woocommerce/woocommerce Aug 1, 2019
@issue-label-bot issue-label-bot bot added the type: bug label Aug 1, 2019

This comment has been minimized.

Copy link

@issue-label-bot issue-label-bot bot commented Aug 1, 2019

Issue-Label Bot is automatically applying the label type: bug to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.