wc_get_attribute_taxonomies

Get attribute taxonomies.

Description

(array) wc_get_attribute_taxonomies(); 

Returns (array)

of objects


Usage

  1. if ( !function_exists( 'wc_get_attribute_taxonomies' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-attribute-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_get_attribute_taxonomies(); 
  7.  

Defined (1)

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

/includes/wc-attribute-functions.php  
  1. function wc_get_attribute_taxonomies() { 
  2. if ( false === ( $attribute_taxonomies = get_transient( 'wc_attribute_taxonomies' ) ) ) { 
  3. global $wpdb; 
  4.  
  5. $attribute_taxonomies = $wpdb->get_results( "SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies order by attribute_name ASC;" ); 
  6.  
  7. set_transient( 'wc_attribute_taxonomies', $attribute_taxonomies ); 
  8.  
  9. return (array) array_filter( apply_filters( 'woocommerce_attribute_taxonomies', $attribute_taxonomies ) );