Add option for flushing rewrite rules

This commit is contained in:
dinamiko 2021-11-05 14:38:04 +01:00
parent 984019cb2b
commit f746c41a83
2 changed files with 4 additions and 1 deletions

View file

@ -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 );
}
}
);