• Resolved shenalorlof

    (@shenalorlof)


    I wanna show text only in single product page and HIDE only in product listings. This code doesn’t work

    add_filter( 'body_class', function( $classes ) {
        if ( function_exists( 'is_shop' ) && is_shop() ) {
            $classes = array_diff( $classes, array( 'wc-add-to-cart-no-text' ) );
        } 
        return $classes;
    }, 20 );

    All my plugins and wordpress are up to date. FYI – Theme is “Page Builder Framework”

    • This topic was modified 3 years, 3 months ago by shenalorlof.
    • This topic was modified 3 years, 3 months ago by shenalorlof.
Viewing 1 replies (of 1 total)
  • Hi, @shenalorlof .

    Thanks for getting in touch and for using our plugin. Please note that what it does is allow you to change/edit the text label displayed in the WooCommerce Add to Cart button. The button itself is still the default button created by the WooCommerce plugin itself.

    Hence, I hope you’ll understand that for what you’d like to achieve, I suggest that you contact WooCommerce Support for the best advice.

    I hope this makes sense and helps point you in the right direction.

    Please let me know if you have any more questions. I will set this as resolved for now.

    Best regards and stay safe,

Viewing 1 replies (of 1 total)
  • The topic ‘Need to hide “add to cart” text only in product listing loo’ is closed to new replies.