Merge pull request #20390 from woocommerce/fix/20369

Clear needs_processing transient when adding a product to an order
This commit is contained in:
Claudiu Lodromanean 2018-06-05 06:56:14 -07:00 committed by GitHub
commit 839d52d153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();
}