woocommerce_taxonomy_args_product_tag

The WooCommerce woocommerce taxonomy args product tag hook.

Description

apply_filters( 'woocommerce_taxonomy_args_product_tag', (callback) $array ); 

Parameters (1)

0. $array — Optional. (callback) => array( 'hierarchical' => false, 'update_count_callback' => '_wc_term_recount', 'label' => __( 'Product tags', 'woocommerce' ), 'labels' => array( 'name' => __( 'Product tags', 'woocommerce' ), 'singular_name' => __( 'Tag', 'woocommerce' ), 'menu_name' => _x( 'Tags', 'Admin menu name', 'woocommerce' ), 'search_items' => __( 'Search tags', 'woocommerce' ), 'all_items' => __( 'All tags', 'woocommerce' ), 'edit_item' => __( 'Edit tag', 'woocommerce' ), 'update_item' => __( 'Update tag', 'woocommerce' ), 'add_new_item' => __( 'Add new tag', 'woocommerce' ), 'new_item_name' => __( 'New tag name', 'woocommerce' ), 'popular_items' => __( 'Popular tags', 'woocommerce' ), 'separate_items_with_commas' => __( 'Separate tags with commas', 'woocommerce' ), 'add_or_remove_items' => __( 'Add or remove tags', 'woocommerce' ), 'choose_from_most_used' => __( 'Choose from the most used tags', 'woocommerce' ), 'not_found' => __( 'No tags found', 'woocommerce' ), ), 'show_ui' => true, 'query_var' => true, 'capabilities' => array( 'manage_terms' => 'manage_product_terms', 'edit_terms' => 'edit_product_terms', 'delete_terms' => 'delete_product_terms', 'assign_terms' => 'assign_product_terms', ), 'rewrite' => array( 'slug' => $permalinks['tag_rewrite_slug'], 'with_front' => false, ), )
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'woocommerce_taxonomy_args_product_tag', $array ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_taxonomy_args_product_tag callback 
  2. function filter_woocommerce_taxonomy_args_product_tag( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_taxonomy_args_product_tag', 'filter_woocommerce_taxonomy_args_product_tag', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_taxonomy_args_product_tag', 'filter_woocommerce_taxonomy_args_product_tag', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/class-wc-post-types.php  
  1. apply_filters( 'woocommerce_taxonomy_args_product_tag', array(