Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter gelvezg

    (@gelvezg)

    Sorry for the delay, I found where the “Facebook for woocommerce” plugin generates the product feed (\wp-content\plugins\facebook-for-woocommerce\includes\fbproductfeed.php) :

    
    public function write_product_feed_file( $wp_ids )
    
    try {
    // Step 1: Prepare the temporary empty feed file with header row.
    $temp_feed_file = $this->prepare_temporary_feed_file();
    
    // Step 2: Write products feed into the temporary feed file.
    $this->write_products_feed_to_temp_file( $wp_ids, $temp_feed_file );
    
    // Step 3: Rename temporary feed file to final feed file.
    $this->rename_temporary_feed_file_to_final_feed_file();
    
    $written = true;
    
    } catch { .... }
    

    But where you get the fields is in the function

    prepare_product_for_feed( $woo_product, &$attribute_variants ) {
    ...
    ...
    // where do I find this code
    static::format_price_for_feed(
    static::get_value_from_product_data( $product_data, 'price', 0 ),
    static::get_value_from_product_data( $product_data, 'currency' )
    ) . ',' .
    ...
    ...
    }
    

    I hope that with this information you can help me. All the best

Viewing 1 replies (of 1 total)