woothemes/woocommerce — Issue #668: $woocommerce->clear_product_transients( $this->id );
Author: ahmadawada11
Created: 2012-02-18 11:40:03+00:00
State: open

i am trying to extend woocommerece i write the following code
$ProductID=14;
$product = new WC_Product($ProductID);
$product->increase_stock(1);

and i get teh following error

Undefined variable: woocommerce in \wp-content\plugins\woocommerce\classes\class-wc-product.php on line 225

Fatal error: Call to a member function clear_product_transients() on a non-object \wp-content\plugins\woocommerce\classes\class-wc-product.php on line 225

the same error occure and i click the restore stock button