wc_attribute_taxonomy_name

Get a product attribute name.

Description

(string) wc_attribute_taxonomy_name( (string) $attribute_name ); 

Returns (string)

Parameters (1)

0. $attribute_name (string)
The attribute name.

Usage

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

Defined (1)

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

/includes/wc-attribute-functions.php  
  1. function wc_attribute_taxonomy_name( $attribute_name ) { 
  2. return 'pa_' . wc_sanitize_taxonomy_name( $attribute_name );