Skip to content

Instantly share code, notes, and snippets.

@Deaner666 Deaner666/functions.php
Last active Nov 13, 2015

What would you like to do?
Add a textarea for the details meta field on WooCommerce product category terms
add_action( 'product_cat_add_form_fields', 'wpm_product_cat_add_details_meta' );
* Add a details metabox to the Add New Product Category page.
* For adding a details metabox to the WordPress admin when
* creating new product categories in WooCommerce.
function wpm_product_cat_add_details_meta() {
wp_nonce_field( basename( __FILE__ ), 'wpm_product_cat_details_nonce' );
<div class="form-field">
<label for="wpm-product-cat-details"><?php esc_html_e( 'Details', 'wpm' ); ?></label>
<textarea name="wpm-product-cat-details" id="wpm-product-cat-details" rows="5" cols="40"></textarea>
<p class="description"><?php esc_html_e( 'Detailed category info to appear below the product list', 'wpm' ); ?></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.