includes/shortcodes/class-wc-shortcode-checkout.php 1 location
|
@@ 199-204 (lines=6) @@
|
| 196 |
|
$order_id = apply_filters( 'woocommerce_thankyou_order_id', absint( $order_id ) ); |
| 197 |
|
$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : wc_clean( $_GET['key'] ) ); |
| 198 |
|
|
| 199 |
|
if ( $order_id > 0 ) { |
| 200 |
|
$order = wc_get_order( $order_id ); |
| 201 |
|
if ( $order->order_key != $order_key ) { |
| 202 |
|
$order = false; |
| 203 |
|
} |
| 204 |
|
} |
| 205 |
|
|
| 206 |
|
// Empty awaiting payment session |
| 207 |
|
unset( WC()->session->order_awaiting_payment ); |
includes/wc-cart-functions.php 1 location
|
@@ 155-161 (lines=7) @@
|
| 152 |
|
$order_id = absint( $wp->query_vars['order-received'] ); |
| 153 |
|
$order_key = isset( $_GET['key'] ) ? wc_clean( $_GET['key'] ) : ''; |
| 154 |
|
|
| 155 |
|
if ( $order_id > 0 ) { |
| 156 |
|
$order = wc_get_order( $order_id ); |
| 157 |
|
|
| 158 |
|
if ( $order->order_key === $order_key ) { |
| 159 |
|
WC()->cart->empty_cart(); |
| 160 |
|
} |
| 161 |
|
} |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
if ( WC()->session->order_awaiting_payment > 0 ) { |