Created
September 18, 2023 12:31
-
-
Save rwsite/97a8d1835851999998d5825c3af6926b to your computer and use it in GitHub Desktop.
remove DeliveryDurationInMinutes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('woocommerce_before_thankyou', function ($wc_order_id){ | |
$wc_order = wc_get_order($wc_order_id); | |
if (empty($wc_order) || $wc_order->has_status('failed')) { | |
return; | |
} | |
$wc_order->update_meta_data('deliveryDurationInMinutes', ''); | |
$wc_order->save_meta_data(); | |
}, 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment