Merge pull request #15961 from electrokit/order_again_merge_option
Feature: Add option for merging when using 'Order Again'
This commit is contained in:
commit
ba2063efa4
|
@ -569,8 +569,9 @@ class WC_Form_Handler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear current cart
|
if ( apply_filters( 'woocommerce_empty_cart_when_order_again', true ) ) {
|
||||||
WC()->cart->empty_cart();
|
WC()->cart->empty_cart();
|
||||||
|
}
|
||||||
|
|
||||||
// Load the previous order - Stop if the order does not exist
|
// Load the previous order - Stop if the order does not exist
|
||||||
$order = wc_get_order( absint( $_GET['order_again'] ) );
|
$order = wc_get_order( absint( $_GET['order_again'] ) );
|
||||||
|
|
Loading…
Reference in New Issue