Woocommerce how to disable add to cart option - wordpress

Disable add to cart option When I purchased product.
I'm using "Martfury - WooCommerce Marketplace WordPress Theme".
This problem is only for variable product. simple product is fine.
Please check this link below and find attachment. please help anyone..
https://daisysell.com/product/2021-new-fashion-lady-oversize-rimless-square-bee-sunglasses/

These hook will help you out
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
add this in functions.php
for more details refer
https://quadlayers.com/remove-add-to-cart-button-in-woocommerce/

Related

Move woocommerce products prices above the products titles in shop page

Good morning. I need to move the prices contained in the cards above the titles in the main shop pages and consequently the category too. I mean not the single page where you see the product itself, but the /shop page where all the products are listed. i don't really know the hook to use and priority to set. Thank you for your help.
It depends on your theme, but if everything is by default, this is the code you need:
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
Code goes in functions.php file of your active theme/child theme. Tested and works.

Sensei and Woocommerce checkout notices - remove action

First question so please be patient!
I'm using Sensei and Woocommerce for an LMS and payment portal site.
When the checkout is complete and a course (from Sensei) has been purchased I want to remove the notice created by Sensei and the top of the page.
It is added with this action.
add_action( 'template_redirect', array( 'Sensei_WC','course_link_from_order' ) );
Therefore, how do I remove or change this notice created by the action
I've tried this!
remove_action( 'template_redirect', array( 'Sensei_WC','course_link_from_order' ) );
in my functions file by alas, no success!
Thanks in advance

Woocommerce - the number of the selected product appears in all forms of other products

Good evening.
Please help me!
I have a website and moved from cards products form the number of and variations in the category. I did it using code, which is placed in the theme file functions.php:
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 10);
However, when I select 2 or more number of same product and click "add to cart", the number of the selected product appears in all forms of other products.
Here is screenshot and a link to my test site:
screenshot
http://xarod.tk/shop/
I also put code:
<div class="abe"><?woocommerce_template_single_add_to_cart(); ?></div>
in the file woocommerce/templates/content-product.php, but got the same thing.

Moving Short Description in Woo Commerce

I've hunted everywhere to figure out how to move the Product Short Description from the right side of the picture on a Single Product page of Woocommerce into the tabs. I just can't find it anywhere!
Can someone please help me accomplish that.
Just remove the woocommerce_template_single_excerpt callback from the woocommerce_single_product_summary action:
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
...and add it directly to a custom tabs.php template:
woocommerce_template_single_excerpt();
Read more about overriding templates in the docs.

woocommerce brands plugin - moving page description

Wondering if anyone knows the correct function hook to move the description on brand pages created with the official Brands Plugin.
http://www.woothemes.com/products/brands/
The function below works perfectly on product archive pages, but has no effect on brand archive pages.
//Move Product Category Description to Genesis after header
remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
add_action( 'genesis_after_header', 'woocommerce_taxonomy_archive_description', 100 );
I've searched for hours but can't find the correct actions.
Guidance would be much appreciated.
Try this
add_action( 'woocommerce_before_main_content', 'woocommerce_taxonomy_archive_description', 1, 5 );

Resources