From 51cfbfb050e2def620617b6b44755fd314e6f2ea Mon Sep 17 00:00:00 2001 From: Himad M Date: Mon, 25 Aug 2025 14:42:18 -0400 Subject: [PATCH] Remove compat Elementor checkout context --- modules/ppcp-compat/src/CompatModule.php | 26 ------------------------ 1 file changed, 26 deletions(-) diff --git a/modules/ppcp-compat/src/CompatModule.php b/modules/ppcp-compat/src/CompatModule.php index 85f2ff27e..4583afa10 100644 --- a/modules/ppcp-compat/src/CompatModule.php +++ b/modules/ppcp-compat/src/CompatModule.php @@ -78,7 +78,6 @@ class CompatModule implements ServiceModule, ExtendingModule, ExecutableModule { $this->fix_page_builders(); $this->exclude_cache_plugins_js_minification( $c ); - $this->set_elementor_checkout_context(); $is_nyp_active = $c->get( 'compat.nyp.is_supported_plugin_version_active' ); if ( $is_nyp_active ) { @@ -435,31 +434,6 @@ class CompatModule implements ServiceModule, ExtendingModule, ExecutableModule { return ( $parent && $parent->get( 'Name' ) === 'Divi' ); } - /** - * Sets the context for the Elementor checkout page. - * - * @return void - */ - protected function set_elementor_checkout_context(): void { - add_action( - 'wp', - function () { - $page_id = get_the_ID(); - if ( ! is_numeric( $page_id ) || ! CartCheckoutDetector::has_elementor_checkout( (int) $page_id ) ) { - return; - } - - add_filter( - 'woocommerce_paypal_payments_context', - function ( string $context ): string { - // Default context. - return ( 'mini-cart' === $context ) ? 'checkout' : $context; - } - ); - } - ); - } - /** * Excludes PayPal scripts from being minified by cache plugins. *