Use transient name directly
This commit is contained in:
parent
9ba5b7ee26
commit
78ec168429
|
@ -28,14 +28,12 @@ function wc_get_text_attributes( $raw_attributes ) {
|
|||
* @return array of objects
|
||||
*/
|
||||
function wc_get_attribute_taxonomies() {
|
||||
$transient_name = 'wc_attribute_taxonomies';
|
||||
|
||||
if ( false === ( $attribute_taxonomies = get_transient( $transient_name ) ) ) {
|
||||
if ( false === ( $attribute_taxonomies = get_transient( 'wc_attribute_taxonomies' ) ) ) {
|
||||
global $wpdb;
|
||||
|
||||
$attribute_taxonomies = $wpdb->get_results( "SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies" );
|
||||
|
||||
set_transient( $transient_name, $attribute_taxonomies );
|
||||
set_transient( 'wc_attribute_taxonomies', $attribute_taxonomies );
|
||||
}
|
||||
|
||||
return (array) array_filter( apply_filters( 'woocommerce_attribute_taxonomies', $attribute_taxonomies ) );
|
||||
|
|
Loading…
Reference in New Issue