Skip to content

Commit 8ff3433

Browse files
authored
Merge pull request #3612 from woocommerce/PCP-3389-fix-elementor-checkout
Fix continuation mode in Elementor checkout (3389)
2 parents c5b9533 + 51cfbfb commit 8ff3433

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
@@ -79,7 +79,6 @@ function () use ( $c ) {
7979

8080
$this->fix_page_builders();
8181
$this->exclude_cache_plugins_js_minification( $c );
82-
$this->set_elementor_checkout_context();
8382

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

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

0 commit comments

Comments
 (0)