This file contains hidden or 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_edit_form_fields', 'wpm_product_cat_edit_details_meta' ); | |
/** | |
* Add a details metabox to the Edit Product Category page. | |
* | |
* For adding a details metabox to the WordPress admin when | |
* editing an existing product category in WooCommerce. | |
* | |
* @param object $term The existing term object. |
This file contains hidden or 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( 'create_product_cat', 'wpm_product_cat_details_meta_save' ); | |
add_action( 'edit_product_cat', 'wpm_product_cat_details_meta_save' ); | |
/** | |
* Save Product Category details meta. | |
* | |
* Save the product_cat details meta POSTed from the | |
* edit product_cat page or the add product_cat page. | |
* |
This file contains hidden or 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( 'woocommerce_after_shop_loop', 'wpm_product_cat_display_details_meta' ); | |
/** | |
* Display details meta on Product Category archives. | |
* | |
*/ | |
function wpm_product_cat_display_details_meta() { | |
if ( ! is_tax( 'product_cat' ) ) { |
OlderNewer