• Resolved ykahyaoglu

    (@ykahyaoglu)


    Hello,
    How to remove select options button? I searched a lot but could not find. When I do some searches on the internet and try the code, my add to cart button goes. I just want to remove the options button. How can I help you I would be glad. This is the code I found.

    // Remove “Select options” button from (variable) products on the main WooCommerce shop page.
    add_filter( ‘woocommerce_loop_add_to_cart_link’, function( $product ) {

    global $product;

    if ( is_shop() && ‘variable’ === $product->product_type ) {
    return ”;
    } else {
    sprintf( ‘%s‘,
    esc_url( $product->add_to_cart_url() ),
    esc_attr( isset( $args[‘quantity’] ) ? $args[‘quantity’] : 1 ),
    esc_attr( isset( $args[‘class’] ) ? $args[‘class’] : ‘button’ ),
    isset( $args[‘attributes’] ) ? wc_implode_html_attributes( $args[‘attributes’] ) : ”,
    esc_html( $product->add_to_cart_text() )
    );
    }

    } );

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to remove select options button’ is closed to new replies.