Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Woocommerce hide out of stock products settings + restock = BUG #411

Closed
fkoomek opened this issue Apr 21, 2019 · 4 comments
Closed

Woocommerce hide out of stock products settings + restock = BUG #411

fkoomek opened this issue Apr 21, 2019 · 4 comments

Comments

@fkoomek
Copy link

fkoomek commented Apr 21, 2019

Can you reproduce this issue on default Wordpress theme (eg Storefront)?

YES

Can you reproduce this issue when all other plugins are disabled except WooCommerce, Polylang and Hyyan WooCommerce Polylang Integration?

YES

What product versions and settings are you using when this issue occurs?

  • PHP: 7.3.1
  • WordPress: 5.1.1
  • WooCommerce: 3.6.1
  • Polylang: 2.5.3
  • Hyyan WooCommerce Polylang Integration: 1.3.0
  • Browser: Chrome,Firefox

Steps to Reproduce

  1. Set Polylang with at least 2 languages
  2. Enable hide out of stock products in Woocommerce settings -> Products -> Inventory
  3. Make product and set stock quantity 1
  4. Translate the product
  5. Buy the product in any language version
  6. Go to Woocommerce - products and set stock quantity from 0 to 1 again.
  7. See the product from front-end in every language version

What I Expected

Products are visible in both language versions.

What Happened Instead

Product is visible again only in the default language. It's not possible to show the product in another language version again.

WordPress Environment

WordPress environment

WordPress address (URL): |   | https://test.liberlapidum.com
Site address (URL): |   | https://test.liberlapidum.com
WooCommerce version: |   | 3.6.1
Log directory writable: |   | /data/web/virtuals/200558/virtual/www/domains/liberlapidum.com/wp-content/uploads/wc-logs/
WordPress version: |   | 5.1.1
WordPress multisite: |   | –
WordPress memory limit: |   | 256 MB
WordPress debug mode: |   |  
WordPress cron: |   |  
Language: |   | en_US
External object cache: |   | –

@fkoomek
Copy link
Author

fkoomek commented Apr 21, 2019

I found out that when I change the product visibility to any value and save, it appears again.
And it doesn't matter if the product is bought from the frontend.
This bug happens every time I set some product quantity to 0 and then to 1 again.

@Jon007
Copy link
Contributor

Jon007 commented May 6, 2019

a volunteer maintainer is needed to look at the whole stock issue along with #391 and #299

There were already issues but with WooCommerce 3.6 it will be worse, as per #408 : 3.6 adds stock status and quantity to new Product Data Lookup Tables which, as they are new, are not synchronised by this plugin at all. (this plugin leverages Polylang synchronisation of post meta, whereas it is now necessary to use the woocommerce api to correctly update the new product data lookup tables and other woocommerce caching mechanisms.)

@fkoomek
Copy link
Author

fkoomek commented May 6, 2019 via email

@Jon007 Jon007 added the stock label May 6, 2019
@Jon007
Copy link
Contributor

Jon007 commented May 23, 2019

@fkoomek this should be fixed by new version of the Stock.php file checked in here 17e29b9

@Jon007 Jon007 closed this as completed May 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants