From be8737e723514df032470cef02e664f23cbbf44c Mon Sep 17 00:00:00 2001 From: carlhandy Date: Mon, 18 Nov 2024 10:11:41 -0400 Subject: [PATCH] attempt to fix rewrite reload issue --- .../class-mmg-checkout-payment-activator.php | 3 ++- .../class-mmg-checkout-payment-rewrites.php | 20 +++++++++++++++++++ main.php | 3 +++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 includes/class-mmg-checkout-payment-rewrites.php diff --git a/includes/class-mmg-checkout-payment-activator.php b/includes/class-mmg-checkout-payment-activator.php index b2f7d65..052d5d7 100644 --- a/includes/class-mmg-checkout-payment-activator.php +++ b/includes/class-mmg-checkout-payment-activator.php @@ -31,7 +31,7 @@ class MMG_Checkout_Payment_Activator { */ public static function activate() { self::mmg_activate(); - add_action( 'init', array( 'self', 'add_rewrite_rules' ) ); + // add_action( 'init', array( 'self', 'add_rewrite_rules' ) ); } /** @@ -65,3 +65,4 @@ private static function add_rewrite_rules() { add_rewrite_tag( '%mmg-checkout%', '([^&]+)' ); } } + diff --git a/includes/class-mmg-checkout-payment-rewrites.php b/includes/class-mmg-checkout-payment-rewrites.php new file mode 100644 index 0000000..0261a9b --- /dev/null +++ b/includes/class-mmg-checkout-payment-rewrites.php @@ -0,0 +1,20 @@ +getVcsApi()->enableReleaseAssets(); +MMG_Checkout_Payment_Rewrites::init(); + if ( MMG_Dependency_Checker::check_dependencies() ) { /** * Initialize the MMG Checkout Payment functionality.