简体   繁体   中英

wooCommerce display Attribute description on single product page

Hey there guys I'm developing for www.911quotes.com and on our single products page we would like to show the attributes description under the checkout button.

Any help on how to get this done would be great. I have been searching and searching. We are using WooCommerce and I can't seem to figure this one out.

Normally you wouldn't see the "Checkout" button on the Single Products page - you'd see the "Add to Cart" button! Assuming that's what you mean, you can hook into this area as follows:

// Hook below Add to Cart Button
add_action( 'woocommerce_after_add_to_cart_button', 'pgwp_woocommerce_after_add_to_cart_button');
function pgwp_woocommerce_after_add_to_cart_button () {

    echo '<div id="msg-after-add-button" style="clear:both"><p>Hello World!</p></div>';

}

Not sure what you mean by "the attributes description". I think this is the answer you need for that: Woocommerce getting custom attributes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM