Answer the question
In order to leave comments, you need to log in
Adding your own "Buy Now" button instead of "Add to Cart" WP Woocommerce?
Hello everybody!
A partner store is planned. Accordingly, the basket and everything else is not needed.
Task!
Showcase page - transition from the product card to a detailed description and purchase of the product. The buy button takes you directly to the seller's store for a specific product.
Performed actions:
Installed plugins (with hooks and PHP is extremely weak):
1. Woocommerce Catalog - allows you to disable the cart and add details to the product showcase.
2. WooCommerce Product Archive Customiser
3. Woocommerce LightBox gives a button on the product showcase to go to a quick buy.
When the cart is disabled in the Woocommerce Catalog, the buy button is not displayed in the product description on the page (woocommerce_external_add_to_cart).
The following actions were taken:
remove_action
( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
remove_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
remove_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );
remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation', 10 );
remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );
add_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 );
add_action( '
But no result.
In the Woocommerce LightBox plugin, in the popup window, the button is highlighted and leads to the merchant page!
Cart is disabled in Woocommerce Catalog.
Please tell me what needs to be done, what function to prescribe so that the button appears in the product description.
Thank you all in advance.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question