This commit is contained in:
Pedro Silva 2023-10-12 08:29:52 +01:00
parent c69f2a99b8
commit 46f579c42f
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -95,6 +95,12 @@ class UpdatePaymentDataEndpoint {
// Update shipping address.
if ( $payment_data['callbackTrigger'] === 'SHIPPING_ADDRESS' ) {
/**
* The shipping methods.
*
* @var \WC_Customer|null $customer
*/
$customer = WC()->customer;
if ( $customer ) {
@ -163,6 +169,7 @@ class UpdatePaymentDataEndpoint {
/**
* The shipping methods.
*
* @var \WC_Shipping_Method[] $methods
*/
$methods = $zone->get_shipping_methods( true );