Last active
November 13, 2015 21:57
-
-
Save Deaner666/894732aec08d72e0fc4b to your computer and use it in GitHub Desktop.
Add a textarea for the details meta field on WooCommerce product category terms
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_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> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment