Check order exists when resuming on checkout

This commit is contained in:
Mike Jolley 2014-03-31 11:10:02 +01:00
parent bb869562bd
commit f9b223bc7a
1 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ class WC_Checkout {
$order_status = isset( $terms[0] ) ? $terms[0] : 'pending';
// Resume the unpaid order if its pending
if ( $order_status == 'pending' || $order_status == 'failed' ) {
if ( get_post( $order_id ) && ( $order_status == 'pending' || $order_status == 'failed' ) ) {
// Update the existing order as we are resuming it
$create_new_order = false;