Merge pull request #24173 from woocommerce/fix/order-create-track
[Beta fix] Return early if post status is `auto-draft` to prevent fatal.
This commit is contained in:
commit
1a3e9a668f
|
@ -73,6 +73,10 @@ class WC_Orders_Tracking {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( 'auto-draft' === get_post_status( $id ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$order = wc_get_order( $id );
|
||||
$date_created = $order->get_date_created()->date( 'Y-m-d H:i:s' );
|
||||
// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification
|
||||
|
|
Loading…
Reference in New Issue