woocommerce_rest_reports_variations_extended_attributes

woocommerce_rest_reports_variations_extended_attributes

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_rest_reports_variations_extended_attributes') is found 1 times:

  • /src/Admin/API/Reports/Variations/DataStore.php line 248
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    protected function include_extended_info( &$products_data, $query_args ) {
        foreach ( $products_data as $key => $product_data ) {
            $extended_info = new \ArrayObject();
            if ( $query_args['extended_info'] ) {
                $extended_attributes = apply_filters( 'woocommerce_rest_reports_variations_extended_attributes', $this->extended_attributes, $product_data );
                $parent_product      = wc_get_product( $product_data['product_id'] );
                $attributes          = array();
     
                // Base extended info off the parent variable product if the variation ID is 0.
                // This is caused by simple products with prior sales being converted into variable products.