Adding tooltip to Woocommerce shipping options

Viewed 1272

Just to check if there's a way to add in tooltips or popovers for my shipping options to explain to the customers in more details what is this option about when they hover or tap on it(via mobile)?

some text

1 Answers

Easy solution is to use a modal popup on click by adding the following to your functions.php file (see screenshots below). Link will be placed below the shipping options.

Refer to here for basic popup code: https://www.w3schools.com/howto/howto_js_popup.asp

Alternatively, use the Boxzilla plugin (free) with the code below.

    add_action( 'woocommerce_checkout_order_review', function() {
    echo '<p style="text-align: center; text-decoration: underline;"><a href="#boxzilla-15213">Shipping Estimates</p>';
});
Related