Skip to content

Commit 51cfbfb

Browse files
committed
Remove compat Elementor checkout context
1 parent 3b80ec8 commit 51cfbfb

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

modules/ppcp-compat/src/CompatModule.php

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ function () use ( $c ) {
7878

7979
$this->fix_page_builders();
8080
$this->exclude_cache_plugins_js_minification( $c );
81-
$this->set_elementor_checkout_context();
8281

8382
$is_nyp_active = $c->get( 'compat.nyp.is_supported_plugin_version_active' );
8483
if ( $is_nyp_active ) {
@@ -435,31 +434,6 @@ protected function is_divi_child_theme_active(): bool {
435434
return ( $parent && $parent->get( 'Name' ) === 'Divi' );
436435
}
437436

438-
/**
439-
* Sets the context for the Elementor checkout page.
440-
*
441-
* @return void
442-
*/
443-
protected function set_elementor_checkout_context(): void {
444-
add_action(
445-
'wp',
446-
function () {
447-
$page_id = get_the_ID();
448-
if ( ! is_numeric( $page_id ) || ! CartCheckoutDetector::has_elementor_checkout( (int) $page_id ) ) {
449-
return;
450-
}
451-
452-
add_filter(
453-
'woocommerce_paypal_payments_context',
454-
function ( string $context ): string {
455-
// Default context.
456-
return ( 'mini-cart' === $context ) ? 'checkout' : $context;
457-
}
458-
);
459-
}
460-
);
461-
}
462-
463437
/**
464438
* Excludes PayPal scripts from being minified by cache plugins.
465439
*

0 commit comments

Comments
 (0)