br_aapf_get_attributes

Get all possible woocommerce attribute taxonomies.

Description

(mixed|void) br_aapf_get_attributes(); 

Returns (mixed|void)


Usage

  1. if ( !function_exists( 'br_aapf_get_attributes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'advanced-ajax-product-filter-for-woocommerce/includes/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = br_aapf_get_attributes(); 
  7.  

Defined (1)

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

/includes/functions.php  
  1. function br_aapf_get_attributes() { 
  2. $attribute_taxonomies = wc_get_attribute_taxonomies(); 
  3. $attributes = array(); 
  4.  
  5. if ( $attribute_taxonomies ) { 
  6. foreach ( $attribute_taxonomies as $tax ) { 
  7. $attributes[ wc_attribute_taxonomy_name( $tax->attribute_name ) ] = $tax->attribute_label; 
  8.  
  9. return apply_filters( 'berocket_aapf_get_attributes', $attributes );