mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
add hook to remove cache on listening request
This commit is contained in:
parent
c10c4feb09
commit
9a85d86ef5
1 changed files with 10 additions and 0 deletions
|
@ -104,6 +104,16 @@ class ApplepayModule implements ModuleInterface {
|
||||||
$apple_status->apple_is_active();
|
$apple_status->apple_is_active();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
add_action(
|
||||||
|
'woocommerce_paypal_payments_on_listening_request',
|
||||||
|
static function() use ( $c ) {
|
||||||
|
$apple_status = $c->get( 'applepay.apple-product-status' );
|
||||||
|
if ( $apple_status->has( AppleProductStatus::APPLE_STATUS_CACHE_KEY ) ) {
|
||||||
|
$apple_status->delete( AppleProductStatus::APPLE_STATUS_CACHE_KEY );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue