Can’t use it with other plugins that changes stock management
-
The plugin does not works when using it along with another plugin that manages the stock (https://github.com/bruno-rodrigues/woocommerce-cart-stock-reducer).
That’s because the way that the stock quantity is retrieved:
$stock_quantity = get_post_meta( $product->id, '_stock', true );
Would be a lot better if the quantity was retrieved via:
$stock_quantity = $product->get_stock_quantity();
That way any other plugin that adds a filter to WC’s
get_stock_quantity()
will keep working nicely.Btw, I just submitted a PR with a possible solution. Please take a look at: https://github.com/wp-plugins/woocommerce-product-stock-alert/pull/1
Best Regards,
Bruno Rodrigues
- The topic ‘Can’t use it with other plugins that changes stock management’ is closed to new replies.