mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add option for flushing rewrite rules
This commit is contained in:
parent
984019cb2b
commit
f746c41a83
2 changed files with 4 additions and 1 deletions
|
@ -54,6 +54,10 @@ class VaultingModule implements ModuleInterface {
|
|||
'init',
|
||||
function () {
|
||||
add_rewrite_endpoint( 'ppcp-paypal-payment-tokens', EP_PAGES );
|
||||
if ( ! get_option( 'woocommerce-ppcp-payment-tokens-flushed', false ) ) {
|
||||
flush_rewrite_rules();
|
||||
add_option( 'woocommerce-ppcp-payment-tokens-flushed', true );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@ define( 'PPCP_FLAG_SUBSCRIPTION', true );
|
|||
function () {
|
||||
init();
|
||||
do_action( 'woocommerce_paypal_payments_gateway_activate' );
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
);
|
||||
register_deactivation_hook(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue