For regular products, ensure stock level saves on product creation.

This commit is contained in:
Mike Jolley 2014-09-10 23:55:40 +01:00
parent 17f0168e8b
commit 3a4ba6e4c8
3 changed files with 8 additions and 3 deletions

View File

@ -176,6 +176,9 @@ class WC_Product {
if ( ! is_null( $amount ) && $this->managing_stock() ) {
// Ensure key exists
add_post_meta( $this->id, '_stock', 0, true );
// Update stock in DB directly
switch ( $mode ) {
case 'add' :

View File

@ -4,7 +4,7 @@ Tags: ecommerce, e-commerce, commerce, woothemes, wordpress ecommerce, affiliate
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal@woothemes.com&item_name=Donation+for+WooCommerce
Requires at least: 3.8
Tested up to: 4.0
Stable tag: 2.2.1
Stable tag: 2.2.2
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@ -132,6 +132,8 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
= 2.2.2 =
* Fix - Saving of variation stock when parent stock management is disabled.
* Fix - "open_basedir restriction in effect" error caused on install when trying to create the WC logging directory.
* Fix - For regular products, ensure stock level saves on product creation.
= 2.2.1 - 10/09/2014 =
* Fix - Small tweak to the installer to prevent errors caused by outdated plugins.

View File

@ -3,7 +3,7 @@
* Plugin Name: WooCommerce
* Plugin URI: http://www.woothemes.com/woocommerce/
* Description: An e-commerce toolkit that helps you sell anything. Beautifully.
* Version: 2.2.1
* Version: 2.2.2
* Author: WooThemes
* Author URI: http://woothemes.com
* Requires at least: 3.8
@ -33,7 +33,7 @@ final class WooCommerce {
/**
* @var string
*/
public $version = '2.2.1';
public $version = '2.2.2';
/**
* @var WooCommerce The single instance of the class