| @@ -55,9 +55,9 @@ | ||
| 55 | 55 | |
| 56 | 56 | // Escape default woocommerce cart page. |
| 57 | 57 | if ( array_key_exists( 'skip_cart_page', $options ) && '1' === $options['skip_cart_page'] ) { |
| 58 | 58 | if ( WC()->cart->cart_contents_count > 0 ) { |
| 59 | - echo wc_get_checkout_url(); | |
| 59 | + echo esc_url( wc_get_checkout_url() ); | |
| 60 | 60 | wp_safe_redirect( wc_get_checkout_url() ); |
| 61 | 61 | exit(); |
| 62 | 62 | } |
| 63 | 63 | } |
| @@ -89,9 +89,10 @@ | ||
| 89 | 89 | }, 5 ); |
| 90 | 90 | |
| 91 | 91 | add_filter( 'the_content', function() use ( $template_id ) { |
| 92 | 92 | ob_start(); |
| 93 | - echo \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template_id, true ); | |
| 93 | + $content = \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( (int) $template_id, true ); | |
| 94 | + echo do_shortcode( $content ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Elementor template HTML; wp_kses_post strips required style/script. | |
| 94 | 95 | return ob_get_clean(); |
| 95 | 96 | } ); |
| 96 | 97 | } |
| 97 | 98 | } |