settings = $settings; /* Step 1 wrap. */ add_action( 'sellkit-checkout-step-a-begins', [ $this, 'first_step_begin' ], 10 ); add_action( 'sellkit-checkout-step-a-ends', [ $this, 'first_step_ends' ] ); /* Step 2 wrap. */ add_action( 'sellkit-checkout-step-b-begins', [ $this, 'second_step_begin' ] ); add_action( 'sellkit-checkout-step-b-ends', [ $this, 'second_step_ends' ] ); // Step 2 preview box. if ( 'yes' === $this->settings['show_preview_box'] ) { add_action( 'sellkit-checkout-widget-step-two-header', [ $this, 'step_two_preview_box' ] ); } /* Step 3 wrap. */ add_action( 'sellkit-checkout-step-c-begins', [ $this, 'third_step_begin' ], 5 ); add_action( 'sellkit-checkout-multistep-third-step-back-btn', [ $this, 'third_step_back_btn' ] ); add_action( 'sellkit-checkout-step-c-ends', [ $this, 'third_step_ends' ] ); // Step 3 preview box. if ( 'yes' === $this->settings['show_preview_box'] ) { add_action( 'sellkit-checkout-widget-step-three-header', [ $this, 'step_three_preview_box' ] ); } // Remove payment method from order review & attach it to step 3. remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 ); add_action( 'sellkit-checkout-step-c-begins', 'woocommerce_checkout_payment', 20 ); $shipping_destination = get_option( 'woocommerce_ship_to_destination', true ); if ( 'billing_only' !== $shipping_destination ) { remove_action( 'woocommerce_checkout_billing', [ WC()->checkout(), 'checkout_form_billing' ] ); add_action( 'sellkit-checkout-step-c-begins', [ WC()->checkout(), 'checkout_form_billing' ], 10 ); } // Sidebar order-review wrap. add_action( 'sellkit-checkout-multistep-sidebar-begins', [ $this, 'sidebar_starts' ], 10 ); add_action( 'sellkit-checkout-multistep-sidebar-ends', [ $this, 'sidebar_ends' ] ); // Attach Breadcrumbs. if ( 'yes' === $settings['show_breadcrumb'] ) { // We added this custom hook @sellkit-local-hooks class, before form. add_action( 'sellkit-checkout-widget-breadcrumb-desktop', [ $this, 'checkout_breadcrumb_desktop' ] ); add_action( 'sellkit-checkout-widget-breadcrumb-mobile', [ $this, 'checkout_breadcrumb_mobile' ] ); } } /** * Inner wrapper begins. * Left columns begins. * First Step Begins. * * @return void * @since 1.1.0 */ public function first_step_begin() { echo sprintf( '