woocommerce / woocommerce-product-tables-feature-plugin

Implements new data-stores and moves product data into custom tables, with a new, normalised data structure.
GNU General Public License v3.0
193 stars 32 forks source link

Implement `get_query_for_stock` from WC core #186

Closed blobaugh closed 3 years ago

blobaugh commented 3 years ago

WooCommerce Core implemented a method to get the current stock quantity for a product. This patch brings that functionality into the feature plugin as well.

Without this patch, customers are unable to checkout with any product that is managing inventory levels.

See core method https://github.com/woocommerce/woocommerce/blob/09d98a6fe059c4a0c5e88a549213a08b56314e85/includes/data-stores/class-wc-product-data-store-cpt.php#L2112

Testing: Before applying this patch

After applying this patch

claudiosanches commented 3 years ago

Travis isn't working, but seems like doesn't sound related to this PR, so I'm merging this one now. Thanks!