diff --git a/includes/Products/Feed.php b/includes/Products/Feed.php index 2709a8c81..11914e4d9 100644 --- a/includes/Products/Feed.php +++ b/includes/Products/Feed.php @@ -169,6 +169,22 @@ public function schedule_feed_generation() { $store_allows_feed = $configured_ok && $integration->is_legacy_feed_file_generation_enabled(); if ( ! $store_allows_sync || ! $store_allows_feed ) { as_unschedule_all_actions( self::GENERATE_FEED_ACTION ); + + $message = ''; + if ( ! $configured_ok ) { + $message = 'Integration not configured.'; + } elseif ( ! $store_allows_feed ) { + $message = 'Store does not allow feed.'; + } elseif ( ! $store_allows_sync ) { + $message = 'Store does not allow sync.'; + } + WC_Facebookcommerce_Utils::logToMeta( + sprintf( 'Product feed scheduling failed: %s', $message ), + array( + 'flow_name' => 'product_feed', + 'flow_step' => 'schedule_feed_generation', + ) + ); return; }