ClassicPress / classic-commerce

A simple but powerful e-commerce platform built for ClassicPress. Forked from WooCommerce and compatible with many Woo extensions.
https://classiccommerce.cc/
GNU General Public License v3.0
54 stars 15 forks source link

Fix Undefined index: _low_stock_amount error #340

Closed ghost closed 3 years ago

ghost commented 3 years ago

All Submissions:

Changes proposed in this Pull Request:

When saving a product, the following error is obtained:

PHP Notice: Undefined index: _low_stock_amount in wp-content/plugins/classic-commerce/includes/admin/meta-boxes/class-wc-meta-box-product-data.php on line 368

The problem is inherited from WooCommerce. It has also been reported on the WordPress site at https://wordpress.org/support/topic/undefined-index-_low_stock_amount-when-saving-product/

WooCommerce issued this fix woocommerce/woocommerce#22681

Closes #312 .

How to test the changes in this Pull Request:

  1. Enable debugging in CP
  2. Open any product in admin
  3. Save product
  4. See error
  5. Change the line in the file
  6. Open product and save
  7. Check no errors

Other information:

ghost commented 3 years ago

.