mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Merge pull request #1468 from woocommerce/PCP-1759-fix-caches-on-update
Refresh DCC/PUI status caches on plugin update
This commit is contained in:
commit
7498417306
1 changed files with 9 additions and 0 deletions
|
@ -286,6 +286,15 @@ class WCGatewayModule implements ModuleInterface {
|
|||
$settings->set( 'products_dcc_enabled', false );
|
||||
$settings->set( 'products_pui_enabled', false );
|
||||
$settings->persist();
|
||||
|
||||
// Update caches.
|
||||
$dcc_status = $c->get( 'wcgateway.helper.dcc-product-status' );
|
||||
assert( $dcc_status instanceof DCCProductStatus );
|
||||
$dcc_status->dcc_is_active();
|
||||
|
||||
$pui_status = $c->get( 'wcgateway.pay-upon-invoice-product-status' );
|
||||
assert( $pui_status instanceof PayUponInvoiceProductStatus );
|
||||
$pui_status->pui_is_active();
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue