Home › Forums › Support › How to disable the Bid now and Add to Cart Buttons on the Wocommerce Shop Page?
- This topic has 19 replies, 3 voices, and was last updated 6 years, 5 months ago by
Leo.
-
AuthorPosts
-
November 2, 2019 at 5:12 am #1051171
bluebit
On my homepage which also is the woocommerce shop page, how can I remove or disable the bid now and add to cart buttons?
November 2, 2019 at 8:07 am #1051383David
StaffCustomer SupportHi there,
you can add this PHP snippet:
add_action( 'after_setup_theme', function() { remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart'); } );November 2, 2019 at 8:21 am #1051393bluebit
i added the snippet and its not working
November 2, 2019 at 8:35 am #1051401David
StaffCustomer SupportWhere did you add the snippet ?
November 2, 2019 at 8:37 am #1051408bluebit
to a plugin called custom snippets
November 2, 2019 at 8:40 am #1051415David
StaffCustomer SupportOdd – i edited the code above – try that instead.
November 2, 2019 at 8:58 am #1051428bluebit
hmm doesn’t work either
November 2, 2019 at 9:01 am #1051431David
StaffCustomer SupportAre you using any extra woo plugins ? They may be messing with the add to cart function.
November 2, 2019 at 9:26 am #1051453bluebit
I’m using an auction plugin, maybe that is doing something, this one: https://ignitewoo.com/woocommerce-extensions-plugins-themes/woocommerce-auctions/
November 2, 2019 at 9:27 am #1051454David
StaffCustomer SupportWell its doing something alright – if you disable that plugin temporarily does the code then work ? Least then we can pin down where the issue is
November 2, 2019 at 12:10 pm #1051555bluebit
yes deactivating the plugin temporarily makes it work, so what do I do now, because i need it to work with the plugin activated
November 2, 2019 at 6:04 pm #1051646David
StaffCustomer SupportYou would need to ask the plugin author as they provide no documentation and without the plugin i can’t see what function they are calling.
If they’re unhelpful then you can install the Simply Show Hooks plugin. Visit the archive page and activate it from the Admin Bar you should be able to see the Hook name ( same as above ) and when hovered over the list of functions it calls. With that info we may be able to help
November 4, 2019 at 2:07 am #1052593bluebit
the plugin author is super slow in responding, i installed the Simple Show Hooks plugin and can see https://imgur.com/a/o6WQKhB
November 4, 2019 at 5:08 am #1052692David
StaffCustomer SupportNot sure but try:
add_action( 'after_setup_theme', function() { remove_action( 'woocommerce_after_shop_loop_item', array( 'IgniteWoo_Auctions', 'loop_add_to_cart'),10); } );November 4, 2019 at 6:25 am #1052756bluebit
that didnt work, i think maybe its the ignitewoo add to cart loop that you can see in the screenshot, maybe its possible to disable that or to give it less priority?
-
AuthorPosts
- You must be logged in to reply to this topic.