Home Forums WoodMart support forum How to Hide Add to Cart on Woodmart?

How to Hide Add to Cart on Woodmart?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #570402

    node
    Participant

    Hello, is it possible to hide the Add to Cart button on the Product Page on Woodmart?

    I tried to create code snippets to hide it but it doesn’t work at all.

    Example Code:

    /**
     * Hide the "Add to Cart" button on the product page.
     */
    function hide_add_to_cart_button_on_product_page() {
        if ( is_product() ) {
            remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
        }
    }
    add_action( 'init', 'hide_add_to_cart_button_on_product_page' );
    #570403

    node
    Participant

    Found the answer in this thread:
    https://xtemos.com/forums/topic/deactivate-remove-add-to-cart-button/

    I just need to go Theme Settings > Custom CSS

    On Global Custom CSS section of the page, I just have to add this code:

    .single_add_to_cart_button {
        display: none !important;
    }
    
    #570483

    Luke Nielsen
    Keymaster

    Hello,

    Glad that you found a solution.

    if you’re having trouble of any kind issue, please let me know. I’ll do everything I can to help.

    Have a good day!

    Kind Regards

Viewing 3 posts - 1 through 3 (of 3 total)