woocommerce_product_read_attribute

woocommerce_product_read_attribute

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.10.6.1

apply_filters('woocommerce_product_read_attribute') is found 2 times:

  • /includes/data-stores/class-wc-product-data-store-cpt.php line 645
    				 * @param WC_Product_Attribute $attribute  The attribute object.
    				 * @param array                $meta_value The meta value.
    				 * @param WC_Product           $product    The product object.
    				 */
    				$attributes[] = apply_filters( 'woocommerce_product_read_attribute', $attribute, $meta_value, $product );
    			}
    			$product->set_attributes( $attributes );
    		}
    	}
    
    	/**
    
  • /includes/data-stores/class-wc-product-variable-data-store-cpt.php line 113
    				 * @param WC_Product_Attribute $attribute  The attribute object.
    				 * @param array                $meta_value The meta value.
    				 * @param WC_Product           $product    The product object.
    				 */
    				$attributes[] = apply_filters( 'woocommerce_product_read_attribute', $attribute, $meta_value, $product );
    			}
    			$product->set_attributes( $attributes );
    
    			if ( $force_update ) {
    				$this->update_attributes( $product, true );
    			}