• Resolved mousebucks

    (@mousebucks)


    I use an action that hides the class when the cart is empty and its works great [see the code below]. How can I hide another div / class when the user’s IP address [country code] is PL or US? Thank you very much for help.

    add_action( 'wp_footer', function() {
    
    if ( WC()->cart->is_empty() ) {
        
        echo '<style type="text/css">.left-to-free-shipping{ display: none; opacity: 0; }</style>';
    
    }
    });
    • This topic was modified 3 years, 4 months ago by mousebucks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide DIV based on users country (Woocommerce)’ is closed to new replies.