PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 2.7.0
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v2.7.0
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
← All changes | includes/elementor/modules/checkout/classes/multi-step.php +64 -22 1.2.32.7.0 View file →
@@ -13,8 +13,16 @@
13 13 * @since 1.1.0
14 14 */
15 15 class Multi_Step {
16 16 /**
17 + * Checkout widget settings.
18 + *
19 + * @since 1.8.6
20 + * @var array
21 + */
22 + public $settings;
23 +
24 + /**
17 25 * Class construct.
18 26 *
19 27 * @param array $settings widget settings.
20 28 */
@@ -34,9 +42,9 @@
34 42 add_action( 'sellkit-checkout-widget-step-two-header', [ $this, 'step_two_preview_box' ] );
35 43 }
36 44
37 45 /* Step 3 wrap. */
38 - add_action( 'sellkit-checkout-step-c-begins', [ $this, 'third_step_begin' ] );
46 + add_action( 'sellkit-checkout-step-c-begins', [ $this, 'third_step_begin' ], 5 );
39 47 add_action( 'sellkit-checkout-multistep-third-step-back-btn', [ $this, 'third_step_back_btn' ] );
40 48 add_action( 'sellkit-checkout-step-c-ends', [ $this, 'third_step_ends' ] );
41 49 // Step 3 preview box.
42 50 if ( 'yes' === $this->settings['show_preview_box'] ) {
@@ -44,10 +52,17 @@
44 52 }
45 53
46 54 // Remove payment method from order review & attach it to step 3.
47 55 remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
48 - add_action( 'sellkit-checkout-step-c-begins', 'woocommerce_checkout_payment' );
56 + add_action( 'sellkit-checkout-step-c-begins', 'woocommerce_checkout_payment', 20 );
49 57
58 + $shipping_destination = get_option( 'woocommerce_ship_to_destination', true );
59 +
60 + if ( 'billing_only' !== $shipping_destination ) {
61 + remove_action( 'woocommerce_checkout_billing', [ WC()->checkout(), 'checkout_form_billing' ] );
62 + add_action( 'sellkit-checkout-step-c-begins', [ WC()->checkout(), 'checkout_form_billing' ], 10 );
63 + }
64 +
50 65 // Sidebar order-review wrap.
51 66 add_action( 'sellkit-checkout-multistep-sidebar-begins', [ $this, 'sidebar_starts' ], 10 );
52 67 add_action( 'sellkit-checkout-multistep-sidebar-ends', [ $this, 'sidebar_ends' ] );
53 68
@@ -82,9 +97,9 @@
82 97 * @return void
83 98 * @since 1.1.0
84 99 */
85 100 public function first_step_ends() {
86 - ?>
101 + if ( WC()->cart->needs_shipping() ) : ?>
87 102 <div class="sellkit-multistep-checkout-first-footer">
88 103 <span class="go-to-shipping sellkit-checkout-widget-primary-button">
89 104 <?php
90 105 $text = esc_html__( 'Continue to shipping', 'sellkit' );
@@ -92,14 +107,14 @@
92 107 if ( 'yes' !== $this->settings['show_shipping_method'] ) {
93 108 $text = esc_html__( 'Continue to payment', 'sellkit' );
94 109 }
95 110
96 - echo $text;
111 + echo esc_html( $text );
97 112 ?>
98 113 </span>
99 114 </div>
100 - <?php /* Closed step wrapper */ ?>
101 - </div>
115 + <?php endif; ?>
116 + </div> <?php /* Closed step 1 wrapper */ ?>
102 117 <?php
103 118 }
104 119
105 120 /**
@@ -126,9 +141,9 @@
126 141 public function second_step_ends() {
127 142 ?>
128 143 <section class="sellkit-multistep-checkout-second-footer">
129 144 <span class="go-to-first sellkit-checkout-widget-return-button">
130 - <i class="fa fa-chevron-left"></i>
145 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>
131 146 <span><?php echo esc_html__( 'Return to previous step', 'sellkit' ); ?></span>
132 147 </span>
133 148 <span class="go-to-payment sellkit-checkout-widget-primary-button">
134 149 <?php echo esc_html__( 'Continue to Payment', 'sellkit' ); ?>
@@ -159,11 +174,15 @@
159 174 * @return void
160 175 * @since 1.1.0
161 176 */
162 177 public function third_step_back_btn() {
178 + if ( ! WC()->cart->needs_shipping() ) {
179 + return;
180 + }
181 +
163 182 ?>
164 183 <span class="go-to-second sellkit-checkout-widget-return-button">
165 - <i class="fa fa-chevron-left"></i>
184 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>
166 185 <span><?php echo esc_html__( 'Return to previous step', 'sellkit' ); ?></span>
167 186 </span>
168 187 <?php
169 188 }
@@ -198,13 +217,28 @@
198 217 $class .= ' sellkit-multistep-checkout-sidebar-sticky';
199 218 }
200 219 ?>
201 220 <div class="sellkit-checkout-right-column">
202 - <div id="sellkit-checkout-widget-sidebar" class="<?php echo $class; ?>">
221 + <div id="sellkit-checkout-widget-sidebar" class="<?php echo esc_attr( $class ); ?>">
203 222 <div class="summary_toggle">
204 - <span class="icon"><i class="fa fa-shopping-cart" aria-hidden="true"></i></span>
223 + <span class="summery_toggle_link_wrapper">
224 + <span class="icon sellkit-checkout-summary-toggle-shop-icon">
225 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512">
226 + <path d="M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/>
227 + </svg>
228 + </span>
205 229 <span class="title sellkit-checkout-widget-links"><?php echo esc_html__( 'Hide order summary', 'sellkit' ); ?></span>
206 - <i class="fa fa-3px fa-chevron-up sellkit-checkout-widget-links" style="font-size: 13px; color:#007bff"></i>
230 + <span class="sellkit-checkout-widget-links sellkit-checkout-summary-toggle-up">
231 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512">
232 + <path d="M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"/>
233 + </svg>
234 + </span>
235 + <span class="sellkit-checkout-widget-links sellkit-checkout-summary-toggle-down">
236 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512">
237 + <path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/>
238 + </svg>
239 + </span>
240 + </span>
207 241 <span class="price"><?php wc_cart_totals_order_total_html(); ?></span>
208 242 </div>
209 243 <?php
210 244 }
@@ -228,29 +262,29 @@
228 262 * @return void
229 263 * @since 1.1.0
230 264 */
231 265 public function checkout_breadcrumb_desktop() {
232 - $font = 'fa';
233 - if ( Elementor::$instance->editor->is_edit_mode() ) {
234 - $font = 'fas';
266 + if ( ! WC()->cart->needs_shipping() ) {
267 + return;
235 268 }
269 +
236 270 ?>
237 271 <section id="checkout-widget-breadcrumb" class="sellkit-checkout-widget-breadcrumb-desktop sellkit-checkout-widget-breadcrumb">
238 272 <span class="cart blue-line">
239 - <a href="<?php echo wc_get_cart_url(); ?>" >
273 + <a href="<?php echo esc_url( wc_get_cart_url() ); ?>" >
240 274 <?php echo esc_html__( 'Cart', 'sellkit' ); ?>
241 275 </a>
242 276 </span>
243 277
244 - <i class="<?php echo $font; ?> fa-chevron-right sellkit-checkout-widget-bc-icon"></i>
278 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>
245 279 <span class="information current"><?php echo esc_html__( 'Information', 'sellkit' ); ?></span>
246 280
247 281 <?php if ( 'yes' === $this->settings['show_shipping_method'] ) : ?>
248 - <i class="<?php echo $font; ?> fa-chevron-right sellkit-checkout-widget-bc-icon"></i>
282 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>
249 283 <span class="shipping inactive"><?php echo esc_html__( 'Shipping', 'sellkit' ); ?></span>
250 284 <?php endif; ?>
251 285
252 - <i class="<?php echo $font; ?> fa-chevron-right sellkit-checkout-widget-bc-icon"></i>
286 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>
253 287 <span class="payment inactive"><?php echo esc_html__( 'Payment', 'sellkit' ); ?></span>
254 288 </section>
255 289 <?php
256 290 }
@@ -261,26 +295,30 @@
261 295 * @return void
262 296 * @since 1.1.0
263 297 */
264 298 public function checkout_breadcrumb_mobile() {
299 + if ( ! WC()->cart->needs_shipping() ) {
300 + return;
301 + }
302 +
265 303 ?>
266 304 <section id="checkout-widget-breadcrumb" class="sellkit-checkout-widget-breadcrumb-mobile sellkit-checkout-widget-breadcrumb">
267 305
268 306 <span class="cart">
269 - <a href="<?php echo wc_get_cart_url(); ?>" class="blue-line" >
307 + <a href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="blue-line" >
270 308 <?php echo esc_html__( 'Cart', 'sellkit' ); ?>
271 309 </a>
272 310 </span>
273 311
274 - <i class="fa fa-chevron-right sellkit-checkout-widget-bc-icon" aria-hidden="true"></i>
312 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>
275 313 <span class="information current"><?php echo esc_html__( 'Information', 'sellkit' ); ?></span>
276 314
277 315 <?php if ( 'yes' === $this->settings['show_shipping_method'] ) : ?>
278 - <i class="fa fa-chevron-right sellkit-checkout-widget-bc-icon" aria-hidden="true"></i>
316 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>
279 317 <span class="shipping inactive"><?php echo esc_html__( 'Shipping', 'sellkit' ); ?></span>
280 318 <?php endif; ?>
281 319
282 - <i class="fa fa-chevron-right sellkit-checkout-widget-bc-icon" aria-hidden="true"></i>
320 + <svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 320 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>
283 321 <span class="payment inactive"><?php echo esc_html__( 'Payment', 'sellkit' ); ?></span>
284 322 </section>
285 323 <?php
286 324 }
@@ -323,8 +361,12 @@
323 361 * @return void
324 362 * @since 1.1.0
325 363 */
326 364 public static function step_three_preview_box() {
365 + if ( ! WC()->cart->needs_shipping() ) {
366 + return;
367 + }
368 +
327 369 ?>
328 370 <section class="sellkit-multistep-checkout-third-header multistep-headers sellkit-checkout-widget-divider">
329 371 <div class="info-a" >
330 372 <div>