woocommerce_set_term_order

The WooCommerce woocommerce set term order function.

Description

woocommerce_set_term_order( $term_id, $index, $taxonomy, (bool) $recursive = false ); 

Parameters (4)

0. $term_id
The term id.
1. $index
The index.
2. $taxonomy
The taxonomy.
3. $recursive — Optional. (bool) => false
The recursive.

Usage

  1. if ( !function_exists( 'woocommerce_set_term_order' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The term id. 
  5. $term_id = null; 
  6.  
  7. // The index. 
  8. $index = null; 
  9.  
  10. // The taxonomy. 
  11. $taxonomy = null; 
  12.  
  13. // The recursive. 
  14. $recursive = false; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = woocommerce_set_term_order($term_id, $index, $taxonomy, $recursive); 
  18.  

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_set_term_order( $term_id, $index, $taxonomy, $recursive = false ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_set_term_order' ); 
  3. return wc_set_term_order( $term_id, $index, $taxonomy, $recursive );