Clear needs_processing transient when adding a product to an order

This commit is contained in:
Mike Jolley 2018-06-05 11:28:45 +01:00
parent ce323ec32b
commit 813db4c7f1
1 changed files with 1 additions and 0 deletions

View File

@ -1182,6 +1182,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
$item->save();
$this->add_item( $item );
wc_do_deprecated_action( 'woocommerce_order_add_product', array( $this->get_id(), $item->get_id(), $product, $qty, $args ), '3.0', 'woocommerce_new_order_item action instead' );
delete_transient( 'wc_order_' . $this->get_id() . '_needs_processing' );
return $item->get_id();
}