mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
check if we have an order in the session
This commit is contained in:
parent
ebac2e9efb
commit
df4a4b7fef
1 changed files with 3 additions and 0 deletions
|
@ -131,6 +131,9 @@ class OrderProcessor {
|
|||
*/
|
||||
public function process( \WC_Order $wc_order, \WooCommerce $woocommerce ): bool {
|
||||
$order = $this->session_handler->order();
|
||||
if (! $order) {
|
||||
return false;
|
||||
}
|
||||
$wc_order->update_meta_data( PayPalGateway::ORDER_ID_META_KEY, $order->id() );
|
||||
$wc_order->update_meta_data( PayPalGateway::INTENT_META_KEY, $order->intent() );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue