Reply 345853 to: how can i remove the cart button on every page?

Avatar: Rose Tyler
Rose Tyler
Support staff
February 2, 2023 at 13:58

Hello, Laskowidz

Thanks for the details!
As you know we are not providing customization services but can only give some snippets filters or direct our customers where some files are located.
We can suggest you next php snippet which you may add to your child-theme/functions.php ( https://prnt.sc/ry2TlXOEE0T1 )

add_action('woocommerce_after_shop_loop_item', function() {
    global $product;
    echo '<a href="'.home_url('?buy-now='.$product->get_ID().'&qty=1&coupon=&ship-via=flat_rate&page=11&with-cart=0').'" class="button wp-element-button product_type_'.$product->get_type().'">'.esc_html__('Kup teraz', 'xstore-child').'</a>';
}, 30);

We checked the link of the button you shared with us by screenshot and modified it according to universal parameters.
Frontend results -> https://prnt.sc/NAE0IQ_5iB-q

Kind Regards,
8theme team

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.