Hi there,
we hope you’re doing well!
In order to achieve what you need, perform the following steps:
In Add to Wishlist Options:
– Product page settings -> Position of “Add to wishlist” on product page > After “Add to Cart”
– Text customization > “Add to wishlist” text > leave it blank
Then, add this CSS in Appearance > Customize > Additional CSS:
.product-main .yith-wcwl-add-button .button:not(.icon)>i {
margin-left: initial !important;
margin-right: initial !important;
}
.product-main .cart {
display: flex !important;
}
.product-main .yith-wcwl-add-to-wishlist {
position: relative !important;
left: 10px !important;
}
And finally, add this code in the functions.php file of your active theme:
if ( defined('YITH_WCWL') && ! function_exists( 'yith_wcwl_move_atw_button_custom' ) ) {
function yith_wcwl_move_atw_button_custom() {
$jquery = '
jQuery(document).ready(function($) {
$(".product-main .yith-wcwl-add-to-wishlist").insertAfter(".product-main .single_add_to_cart_button");
});';
wp_add_inline_script('jquery-yith-wcwl', $jquery);
wp_add_inline_script('jquery-yith-wcwl-user', $jquery);
}
add_action( 'wp_enqueue_scripts', 'yith_wcwl_move_atw_button_custom', 99 );
}
Try it out and tell us if it works well for you.
We will be attentive to any news.
Have a nice day!