File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
modules/ppcp-wc-gateway/src Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1037,6 +1037,16 @@ function ( WC_Order $wc_order ) use ( $set_order_contacts ): void {
10371037 $ set_order_contacts ( $ wc_order );
10381038 }
10391039 );
1040+ // There is a race condition in express block checkout, the contacts set in woocommerce_paypal_payments_contacts_added
1041+ // may get reverted by another ajax WC request. So we set them again after that.
1042+ add_action (
1043+ 'woocommerce_store_api_cart_update_order_from_request ' ,
1044+ function ( WC_Order $ wc_order ) use ( $ set_order_contacts ): void {
1045+ // This hook fires for all methods, but we do not do anything if the meta is not set
1046+ // so probably no need to add additional checks.
1047+ $ set_order_contacts ( $ wc_order );
1048+ }
1049+ );
10401050 }
10411051
10421052 /**
You can’t perform that action at this time.
0 commit comments