Description To run the hook, copy the example below.
// woocommerce single catalog product extra text add
// run the action
// Run the action
do_action( 'woocommerce_after_add_to_cart_form' );
The following example is for adding a hook callback.
// // define the woocommerce_after_add_to_cart_form callback
// run the action
function robin_after_add_to_cart_btn(){
echo '<br/><span style="color:#fff;background: #589d3e;padding: 2px 6px;border-radius: 2px;"> Brand Fulfilled</span>
This product would be shipped directly from our store or vendor.<br/>';
echo '<br/><span style="color:#fff;background: #589d3e;padding: 2px 6px;border-radius: 2px;"> Brand Fulfilled</span>
FREE DELIVERY<br/>';
echo '<br/><span style="color:#fff;background: #589d3e;padding: 2px 6px;border-radius: 2px;"> Brand Fulfilled</span>
FREE CASH ON DELIVERY<br/>';
echo '<br/><img src="your_image link/buyer-protection.png"><span style="color:black;"> 100% Buyer Protection, 6 Days Easy Return/Exchange policy.</span><br/><br/>';
}
// Add the action
add_action( 'woocommerce_after_add_to_cart_form', 'robin_after_add_to_cart_btn' );
// remove the action
remove_action( 'woocommerce_after_add_to_cart_form', 'robin_after_add_to_cart_btn' )
Sample of output
No comments:
Post a Comment