WC_Product_Attribute::get_taxonomy_object
Get taxonomy object.
Returns null when the attribute is not a taxonomy, or when its global attribute is no longer loaded, for example right after it is deleted.
Method of the class: WC_Product_Attribute{}
No Hooks.
Returns
array|null.
Usage
$WC_Product_Attribute = new WC_Product_Attribute(); $WC_Product_Attribute->get_taxonomy_object();
WC_Product_Attribute::get_taxonomy_object() WC Product Attribute::get taxonomy object code WC 11.2.1
public function get_taxonomy_object() {
global $wc_product_attributes;
return $this->is_taxonomy() && isset( $wc_product_attributes[ $this->get_name() ] ) ? $wc_product_attributes[ $this->get_name() ] : null;
}