It would be good if promotions created using FlyCart’s “WooCommerce Discount Rules” extension could be added to the promotion feed created by the Google Product Feed plugin.
Open
Last updated: January 29, 2025
Log in to comment on this feature request.
If anyone needs that feature asap, you can a lookup for the sale price and update it in generate_prices_for_product in ProductFeedItemFactory.php. We had to hack the plugin because the hook(woocommerce_gpf_elements) available elsewhere in the documentation will add an element to the feed but not “You can add or override any element value with one of your own”.
In the function I mentioned above, look for where $sale_price and $active_price are defined, and add the code below between them:
if ( is_plugin_active(‘woo-discount-rules-pro/woo-discount-rules-pro.php’) ){
$new_sale_price = apply_filters(‘advanced_woo_discount_rules_get_product_discount_price’, $sale_price, $product);
error_log(“ProductFeedItemFactory generate_prices_for_product old sale price: $sale_price – new sale price: $new_sale_price”);
$sale_price = $new_sale_price;
}
Please only try this if you are a developer.