- How can I hide the "Next" button for the last step?
You can achieve this by enabling the option "Hide the Next button for the Last step" in the Next and Previous Button Settings inside the Advanced Settings tab.
- How to remove the login step for already logged in users?
Please add the below code snippet in your child theme’s functions.php file.
add_filter('thwmsc_steps_front_end', 'thwmsc_remove_custom_step_login', 11);
function thwmsc_remove_custom_step_login($settings){
if(is_user_logged_in() && array_key_exists('login', $settings)){
unset($settings['login']);
}
return $settings;
} - How to include Login step in Multi step.
Please enable the option “Include Login step” inside the Advanced Settings tab.
- How to display Multi steps only for specific products.
Please add the below code snippet in your child theme's functions.php file in order to achieve your requirement.
add_filter('thwmsc_msc_enable','th_1234thwmsc_msc_enable');
function th_1234thwmsc_msc_enable($enable) {
$tankr = array();
foreach( WC()->cart->get_cart() as $cart_item ){
$product_id = isset($cart_item['product_id']) ? $cart_item['product_id'] : false;
$product_id = !empty($cart_item['variation_id']) ? $cart_item['variation_id'] : $product_id;
$id_array = array(product_id1,product_id2);
if (in_array($cart_item['product_id'], $id_array)){
array_push($tankr, $cart_item['product_id']);
}
}
$enable = !empty($tankr) ? true : false;
return $enable;
}In the above code, please replace product_d1 and product_id2 with your product id.
Comments
1 comment
Hi,
Please add the below filter function in your child theme's functions.php file to achieve your requirement.
In the above code snippet, please replace the following.
1. The category_name1 and category_name2 with your corresponding category names.
2. The test_step,test_step1, and test_step2 with the corresponding steps you would like to hide.
I hope this will work for you.
Have a great day!
Please sign in to leave a comment.