Last active
August 29, 2015 14:10
-
-
Save webaware/5d1dc611437dc60f25fb to your computer and use it in GitHub Desktop.
Add product description underneath the product title on an order form from Order Form for WooCommerce. Requires version 1.0.5 or higher. http://orderform-woo.webaware.net.au/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* add product description to Order Form for WooCommerce product | |
* @param WC_Product $product | |
* @param array $attrs | |
*/ | |
add_action('orderform_woocommerce_order_item_end', function($product, $attrs) { | |
$description = $product->get_post_data()->post_content; | |
echo wp_kses_post(wpautop(do_shortcode($description))); | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment