Hi! Here’s the TEMPORARY fix I’ve been applying to my sites while the plugin author fixes this.
The code only hides the content of woocommerce-info that contains the mentioned and exactly text “You have to enter your address first in order to search for Drop-Off location“, if there is another text, change it to that one.
In your theme funtions.php, put:
/**
* Temporary solution to hide a specific WooCommerce info message added by the Packlink plugin on the checkout page.
*
* This function adds a script to the footer that uses jQuery to find and hide a specific
* WooCommerce info message that is displayed by the Packlink plugin.
* The message "You have to enter your address first in order to search for Drop-Off location" is targeted.
* This helps improve the user experience by removing unnecessary or temporary messages.
*
* Note: This is a temporary solution until the plugin author addresses the issue.
*/
function hide_specific_woocommerce_info_on_checkout() {
if ( function_exists( 'is_checkout' ) && is_checkout() ) {
echo '<script>
jQuery(document).ready(function($) {
$(".woocommerce-info:contains(\'You have to enter your address first in order to search for Drop-Off location.\')").hide();
});
</script>';
}
}
add_action('wp_footer', 'hide_specific_woocommerce_info_on_checkout');
Regards ??
-
This reply was modified 1 year, 6 months ago by
Trademarkos.
-
This reply was modified 1 year, 6 months ago by
Trademarkos. Reason: Info added and comment code