Skip to content

Commit 521b484

Browse files
committed
Do not enforce moving checkboxes to woocommerce_checkout_order_review in case of Elementor Pro + Woodmart custom checkout template.
1 parent 5256cb3 commit 521b484

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

includes/compatibility/class-wc-gzd-compatibility-elementor-pro.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,15 @@ function () {
8080
}
8181

8282
/**
83-
* Move checkboxes right before order summary in case the current
84-
* checkout is built with Elementor Pro.
83+
* Move checkboxes right before order summary in case the current checkout is built with Elementor Pro.
8584
*
86-
* Do not move the checkboxes in case the Shopengine Elementor addon is active as this plugin
87-
* does not execute the woocommerce_checkout_order_review hook.
85+
* Do not move the checkboxes in case of Shopengine Elementor addon or Woodmart layout as these extensions
86+
* do not execute the woocommerce_checkout_order_review hook.
8887
*/
8988
if ( ! wc_gzd_post_content_has_shortcode( 'woocommerce_checkout' ) ) {
90-
if ( ! \Vendidero\Germanized\PluginsHelper::is_plugin_active( 'shopengine' ) ) {
89+
$post_type = get_post_type();
90+
91+
if ( apply_filters( 'woocommerce_gzd_elementor_pro_checkout_move_checkboxes', ! \Vendidero\Germanized\PluginsHelper::is_plugin_active( 'shopengine' ) && 'woodmart_layout' !== $post_type ) ) {
9192
if ( has_action( 'woocommerce_review_order_after_payment', 'woocommerce_gzd_template_render_checkout_checkboxes' ) ) {
9293
$has_removed = remove_action( 'woocommerce_review_order_after_payment', 'woocommerce_gzd_template_render_checkout_checkboxes', 10 );
9394

0 commit comments

Comments
 (0)