query( "DELETE FROM {$wpdb->woocommerce_termmeta} WHERE `woocommerce_term_id` = " . $term_id );
}
/**
* Category thumbnail fields.
*
* @access public
* @return void
*/
public function add_category_fields() {
?>
term_id, 'display_type', true );
$image = '';
$thumbnail_id = absint( get_woocommerce_term_meta( $term->term_id, 'thumbnail_id', true ) );
if ( $thumbnail_id )
$image = wp_get_attachment_thumb_url( $thumbnail_id );
else
$image = wc_placeholder_img_src();
?>
|
|
|
|
';
}
return $columns;
}
/**
* Maintain term hierarchy when editing a product.
* @param array $args
* @return array
*/
public function disable_checked_ontop( $args ) {
if ( 'product_cat' == $args['taxonomy'] ) {
$args['checked_ontop'] = false;
}
return $args;
}
}
new WC_Admin_Taxonomies();