woocommerce_taxonomy_args_product_shipping_class

The WooCommerce woocommerce taxonomy args product shipping class hook.

Description

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

Parameters (1)

0. $array — Optional. (callback) => array( 'hierarchical' => false, 'update_count_callback' => '_update_post_term_count', 'label' => __( 'Shipping classes', 'woocommerce' ), 'labels' => array( 'name' => __( 'Product shipping classes', 'woocommerce' ), 'singular_name' => __( 'Shipping class', 'woocommerce' ), 'menu_name' => _x( 'Shipping classes', 'Admin menu name', 'woocommerce' ), 'search_items' => __( 'Search shipping classes', 'woocommerce' ), 'all_items' => __( 'All shipping classes', 'woocommerce' ), 'parent_item' => __( 'Parent shipping class', 'woocommerce' ), 'parent_item_colon' => __( 'Parent shipping class:', 'woocommerce' ), 'edit_item' => __( 'Edit shipping class', 'woocommerce' ), 'update_item' => __( 'Update shipping class', 'woocommerce' ), 'add_new_item' => __( 'Add new shipping class', 'woocommerce' ), 'new_item_name' => __( 'New shipping class Name', 'woocommerce' ), ), 'show_ui' => false, 'show_in_quick_edit' => false, 'show_in_nav_menus' => false, 'query_var' => is_admin(), 'capabilities' => array( 'manage_terms' => 'manage_product_terms', 'edit_terms' => 'edit_product_terms', 'delete_terms' => 'delete_product_terms', 'assign_terms' => 'assign_product_terms', ), 'rewrite' => false, )
The array.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'woocommerce_taxonomy_args_product_shipping_class', $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_shipping_class callback 
  2. function filter_woocommerce_taxonomy_args_product_shipping_class( $array ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_taxonomy_args_product_shipping_class', 'filter_woocommerce_taxonomy_args_product_shipping_class', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_taxonomy_args_product_shipping_class', 'filter_woocommerce_taxonomy_args_product_shipping_class', 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_shipping_class', array(