woocommerce / facebook-for-woocommerce

A first-party extension plugin built for WooCommerce. Development is managed by Ventures.
https://woocommerce.com/products/facebook/
GNU General Public License v2.0
209 stars 137 forks source link

Product stock availability not syncing with Facebook Shop #1701

Open Mikaylahdreams opened 3 years ago

Mikaylahdreams commented 3 years ago

Isolate the bug

Describe the bug

Our merchants tried to update each item with variable products or simple products, and the logs show it sending "availability":"in stock" when adding more units to the product. Still, it keeps showing as out of stock on Facebook Shop.

Steps to reproduce

[Still confirming the specific steps]

Expected behavior

WooCommerce and Facebook Shop should have the same stock availability.

Logs

SSR ``` ### WordPress Environment ### WordPress address (URL): https://www.example.com Site address (URL): https://www.example.com WC Version: 6.8.2 REST API Version: ✔ 6.8.2 WC Blocks Version: ✔ 8.0.0 Action Scheduler Version: ✔ 3.4.0 Log Directory Writable: ✔ WP Version: 6.0.2 WP Multisite: – WP Memory Limit: 512 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.28 PHP Post Max Size: 516 MB PHP Time Limit: 30 PHP Max Input Vars: 1000 cURL Version: 7.81.0 OpenSSL/1.1.1n SUHOSIN Installed: – MySQL Version: 5.6.41-84.1 Max Upload Size: 50 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 6.8.2 WC Database Prefix: VJc_ Total Database Size: 108.52MB Database Data Size: 70.63MB Database Index Size: 37.89MB VJc_woocommerce_sessions: Data: 0.20MB + Index: 0.02MB + Engine InnoDB VJc_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB VJc_woocommerce_order_items: Data: 0.05MB + Index: 0.02MB + Engine InnoDB VJc_woocommerce_order_itemmeta: Data: 0.31MB + Index: 0.28MB + Engine InnoDB VJc_woocommerce_tax_rates: Data: 3.52MB + Index: 6.06MB + Engine InnoDB VJc_woocommerce_tax_rate_locations: Data: 2.52MB + Index: 4.03MB + Engine InnoDB VJc_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_actionscheduler_actions: Data: 2.52MB + Index: 1.55MB + Engine InnoDB staging_VJc_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_actionscheduler_logs: Data: 1.52MB + Index: 1.84MB + Engine InnoDB staging_VJc_ce4wp_abandoned_checkout: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_comments: Data: 0.09MB + Index: 0.09MB + Engine InnoDB staging_VJc_gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB staging_VJc_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_gla_shipping_rates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB staging_VJc_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_mailpoet_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_mailpoet_mapping_to_external_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_newsletters: Data: 0.28MB + Index: 0.03MB + Engine InnoDB staging_VJc_mailpoet_newsletter_links: Data: 0.19MB + Index: 0.17MB + Engine InnoDB staging_VJc_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_newsletter_templates: Data: 6.52MB + Index: 0.00MB + Engine InnoDB staging_VJc_mailpoet_scheduled_tasks: Data: 0.22MB + Index: 0.20MB + Engine InnoDB staging_VJc_mailpoet_scheduled_task_subscribers: Data: 1.52MB + Index: 0.48MB + Engine InnoDB staging_VJc_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_mailpoet_sending_queues: Data: 2.52MB + Index: 0.03MB + Engine InnoDB staging_VJc_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB staging_VJc_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_statistics_newsletters: Data: 0.06MB + Index: 0.03MB + Engine InnoDB staging_VJc_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB staging_VJc_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB staging_VJc_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.06MB + Engine InnoDB staging_VJc_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_mailpoet_subscribers: Data: 0.08MB + Index: 0.13MB + Engine InnoDB staging_VJc_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_subscriber_segment: Data: 0.05MB + Index: 0.03MB + Engine InnoDB staging_VJc_mailpoet_subscriber_tag: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_mailpoet_tags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_options: Data: 4.33MB + Index: 0.08MB + Engine InnoDB staging_VJc_postmeta: Data: 1.52MB + Index: 0.47MB + Engine InnoDB staging_VJc_posts: Data: 1.52MB + Index: 0.13MB + Engine InnoDB staging_VJc_redirection_404: Data: 0.02MB + Index: 0.05MB + Engine InnoDB staging_VJc_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB staging_VJc_redirection_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB staging_VJc_snippets: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_usermeta: Data: 0.16MB + Index: 0.06MB + Engine InnoDB staging_VJc_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB staging_VJc_wc_admin_notes: Data: 0.08MB + Index: 0.00MB + Engine InnoDB staging_VJc_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB staging_VJc_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_wc_order_bundle_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB staging_VJc_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB staging_VJc_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB staging_VJc_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB staging_VJc_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_woocommerce_bundled_itemmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB staging_VJc_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB staging_VJc_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_woocommerce_order_itemmeta: Data: 0.22MB + Index: 0.19MB + Engine InnoDB staging_VJc_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_woocommerce_square_customers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_woocommerce_tax_rates: Data: 3.52MB + Index: 6.06MB + Engine InnoDB staging_VJc_woocommerce_tax_rate_locations: Data: 2.52MB + Index: 4.03MB + Engine InnoDB staging_VJc_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wpgmza: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wpgmza_circles: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wpgmza_maps: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wpgmza_nominatim_geocode_cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wpgmza_polygon: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wpgmza_polylines: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_wpgmza_rectangles: Data: 0.02MB + Index: 0.00MB + Engine InnoDB staging_VJc_yoast_indexable: Data: 0.22MB + Index: 0.19MB + Engine InnoDB staging_VJc_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB staging_VJc_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB staging_VJc_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB staging_VJc_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_actionscheduler_actions: Data: 4.02MB + Index: 1.91MB + Engine InnoDB VJc_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_actionscheduler_logs: Data: 2.02MB + Index: 1.39MB + Engine InnoDB VJc_ce4wp_abandoned_checkout: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_comments: Data: 0.08MB + Index: 0.09MB + Engine InnoDB VJc_gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB VJc_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_gla_shipping_rates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB VJc_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_mailpoet_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_mailpoet_mapping_to_external_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_newsletters: Data: 1.38MB + Index: 0.03MB + Engine InnoDB VJc_mailpoet_newsletter_links: Data: 0.16MB + Index: 0.16MB + Engine InnoDB VJc_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_newsletter_templates: Data: 4.09MB + Index: 0.00MB + Engine InnoDB VJc_mailpoet_scheduled_tasks: Data: 0.25MB + Index: 0.22MB + Engine InnoDB VJc_mailpoet_scheduled_task_subscribers: Data: 0.42MB + Index: 0.14MB + Engine InnoDB VJc_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_mailpoet_sending_queues: Data: 3.52MB + Index: 0.03MB + Engine InnoDB VJc_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB VJc_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_statistics_newsletters: Data: 0.08MB + Index: 0.09MB + Engine InnoDB VJc_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB VJc_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB VJc_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.06MB + Engine InnoDB VJc_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_mailpoet_subscribers: Data: 0.08MB + Index: 0.13MB + Engine InnoDB VJc_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_subscriber_segment: Data: 0.05MB + Index: 0.03MB + Engine InnoDB VJc_mailpoet_subscriber_tag: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_mailpoet_tags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_options: Data: 6.03MB + Index: 1.06MB + Engine InnoDB VJc_postmeta: Data: 1.41MB + Index: 0.45MB + Engine InnoDB VJc_posts: Data: 1.09MB + Index: 0.09MB + Engine InnoDB VJc_redirection_404: Data: 0.45MB + Index: 0.08MB + Engine InnoDB VJc_redirection_groups: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_redirection_items: Data: 0.02MB + Index: 0.09MB + Engine InnoDB VJc_redirection_logs: Data: 0.05MB + Index: 0.05MB + Engine InnoDB VJc_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_usermeta: Data: 0.19MB + Index: 0.06MB + Engine InnoDB VJc_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB VJc_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB VJc_wc_admin_note_actions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB VJc_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_wc_order_bundle_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB VJc_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB VJc_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB VJc_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB VJc_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_woocommerce_bundled_itemmeta: Data: 0.06MB + Index: 0.03MB + Engine InnoDB VJc_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_woocommerce_square_customers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wpgmza: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wpgmza_circles: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wpgmza_maps: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wpgmza_nominatim_geocode_cache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wpgmza_polygon: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wpgmza_polylines: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_wpgmza_rectangles: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_yoast_indexable: Data: 0.19MB + Index: 0.13MB + Engine InnoDB VJc_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB VJc_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_yoast_prominent_words: Data: 0.02MB + Index: 0.05MB + Engine InnoDB VJc_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_zbscrm_api_keys: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_admlog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_aka: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_zbs_companies: Data: 0.02MB + Index: 0.06MB + Engine InnoDB VJc_zbs_contacts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_zbs_customfields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB VJc_zbs_dbmigration_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_zbs_dbmigration_posts: Data: 0.02MB + Index: 0.06MB + Engine InnoDB VJc_zbs_events: Data: 0.02MB + Index: 0.06MB + Engine InnoDB VJc_zbs_event_reminders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_externalsources: Data: 0.05MB + Index: 0.03MB + Engine InnoDB VJc_zbs_forms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_zbs_invoices: Data: 0.02MB + Index: 0.08MB + Engine InnoDB VJc_zbs_lineitems: Data: 0.09MB + Index: 0.03MB + Engine InnoDB VJc_zbs_logs: Data: 2.52MB + Index: 0.20MB + Engine InnoDB VJc_zbs_meta: Data: 1.52MB + Index: 0.00MB + Engine InnoDB VJc_zbs_notifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_object_links: Data: 0.05MB + Index: 0.03MB + Engine InnoDB VJc_zbs_quotes: Data: 0.02MB + Index: 0.08MB + Engine InnoDB VJc_zbs_quotes_templates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_zbs_security_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_segments: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_segments_conditions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_settings: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_zbs_sys_cronmanagerlogs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_sys_email: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_sys_email_hist: Data: 0.02MB + Index: 0.03MB + Engine InnoDB VJc_zbs_tags: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_tags_links: Data: 0.06MB + Index: 0.03MB + Engine InnoDB VJc_zbs_tax_table: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_temphash: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_tracking: Data: 0.02MB + Index: 0.00MB + Engine InnoDB VJc_zbs_transactions: Data: 0.02MB + Index: 0.14MB + Engine InnoDB ### Post Type Counts ### attachment: 52 custom_css: 1 feedback: 247 mailpoet_page: 1 nav_menu_item: 12 page: 17 post: 5 product: 20 revision: 8 shop_coupon: 9 shop_order: 42 shop_order_refund: 2 wp_global_styles: 1 wpforms: 1 yaymail_template: 11 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (28) ### Akismet Anti-Spam: by Automattic – 5.0 Bluehost: by Bluehost – 2.12.5 Classic Editor: by WordPress Contributors – 1.6.2 Code Snippets: by Code Snippets Pro – 3.2.0 Facebook for WooCommerce: by Facebook – 2.6.22 Gallery Custom Links: by Jordy Meow – 2.1.3 Google Listings and Ads: by WooCommerce – 2.1.1 Jetpack: by Automattic – 11.3 Klarna On-Site Messaging for WooCommerce: by krokedil klarna – 1.8.0 Klarna Order Management for WooCommerce: by klarna krokedil – 1.6.10 Klarna Payments for WooCommerce: by krokedil klarna automattic – 2.11.4 MailPoet 3 Premium (New): by MailPoet – 3.96.0 MailPoet 3 (New): by MailPoet – 3.96.1 Pinterest for WooCommerce: by WooCommerce – 1.2.2 Redirection: by John Godley – 5.3.3 WooCommerce Payments: by Automattic – 4.7.0 WooCommerce PayPal Payments: by WooCommerce – 1.9.3 WooCommerce Product Bundles: by WooCommerce – 6.16.1 WooCommerce Shipping & Tax: by WooCommerce – 1.26.3 WooCommerce USPS Shipping: by WooCommerce – 4.5.1 WooCommerce Square: by WooCommerce – 3.1.0 WooCommerce: by Automattic – 6.8.2 Yoast SEO Premium: by Team Yoast – 19.2.1 Yoast SEO: by Team Yoast – 19.6.1 WP Fastest Cache: by Emre Vona – 1.0.5 WP-Sweep: by Lester 'GaMerZ' Chan – 1.1.5 Yoast SEO: WooCommerce: by Team Yoast – 15.1 Jetpack CRM: by Automattic - Jetpack CRM Team – 5.2.0 ### Inactive Plugins (1) ### YayMail - WooCommerce Email Customizer: by YayCommerce – 3.0.3 ### Must Use Plugins (2) ### Endurance Page Cache: by Mike Hansen – 2.2 SSO: by Garth Mortensen Mike Hansen – 0.4 ### Settings ### API Enabled: – Force SSL: – Currency: USD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: bundle (bundle) external (external) grouped (grouped) simple (simple) subscription (subscription) variable (variable) variable subscription (variable-subscription) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: ✔ Enforce Approved Product Download Directories: – ### WC Pages ### Shop base: #5 - /shop/ Cart: #6 - /cart/ Checkout: #7 - /checkout/ My account: #8 - /my-account/ Terms and conditions: #126 - /terms-and-conditions/ ### Theme ### Name: Scandinavian Version: 1.12.0 Author URL: https://www.hellodetail.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔ ### Templates ### Overrides: scandinavian/woocommerce/archive-product.php scandinavian/woocommerce/cart/cart-shipping.php scandinavian/woocommerce/cart/cart-totals.php scandinavian/woocommerce/cart/cart.php scandinavian/woocommerce/checkout/form-checkout.php scandinavian/woocommerce/checkout/form-coupon.php scandinavian/woocommerce/checkout/payment.php scandinavian/woocommerce/checkout/review-order.php scandinavian/woocommerce/checkout/thankyou.php scandinavian/woocommerce/content-product.php scandinavian/woocommerce/content-single-product.php scandinavian/woocommerce/global/wrapper-end.php scandinavian/woocommerce/global/wrapper-start.php scandinavian/woocommerce/loop/add-to-cart.php scandinavian/woocommerce/loop/loop-end.php scandinavian/woocommerce/loop/loop-start.php scandinavian/woocommerce/loop/orderby.php scandinavian/woocommerce/loop/pagination.php scandinavian/woocommerce/loop/price.php scandinavian/woocommerce/loop/rating.php scandinavian/woocommerce/loop/result-count.php scandinavian/woocommerce/loop/sale-flash.php scandinavian/woocommerce/myaccount/form-login.php scandinavian/woocommerce/myaccount/form-lost-password.php scandinavian/woocommerce/myaccount/my-account.php scandinavian/woocommerce/myaccount/navigation.php scandinavian/woocommerce/notices/error.php scandinavian/woocommerce/notices/notice.php scandinavian/woocommerce/notices/success.php scandinavian/woocommerce/single-product/product-image.php scandinavian/woocommerce/single-product/product-thumbnails.php scandinavian/woocommerce/single-product/related.php scandinavian/woocommerce/single-product/review-meta.php scandinavian/woocommerce/single-product/tabs/tabs.php scandinavian/woocommerce/single-product-reviews.php scandinavian/woocommerce/content-product_cat.php ### Subscriptions ### WCS_DEBUG: ✔ No Subscriptions Mode: ✔ Live Subscriptions Live URL: https://www.example.com Subscription Statuses: – WooCommerce Account Connected: ✔ Yes Active Product Key: ❌ No ### Store Setup ### Country / State: United States (US) — California ### Payment Gateway Support ### WooCommerce Payments: products refunds multiple_subscriptions subscription_cancellation subscription_payment_method_change_admin subscription_payment_method_change_customer subscription_payment_method_change subscription_reactivation subscription_suspension subscriptions gateway_scheduled_payments tokenization add_payment_method PayPal: refunds ### Product Bundles ### Database Version: 6.16.1 Loopback Test: ✔ Template Overrides: – ### Klarna Payments Request Log ### 2022-09-03 00:08:41: KP Create Session Response code: 401 Response message: {"headers":[],"body":"401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:39: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:38: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:36: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:34: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:08: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:06: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:05: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:05: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:01: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:08:00: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:07:38: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:06:49: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-03 00:03:45: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: 2022-09-02 03:54:20: KP Create Session Response code: 401 Response message: {"headers":[],"body":"<html><head><title>401 Authorization Required<\/title><\/head><body><center><h1>401 Authorization Required<\/h1><\/center><\/body><\/html>","response":{"code":401,"message":"Unauthorized"},"cookies":[],"filename":null,"http_response":{"data":null,"headers":null,"status":null}} Correlation ID: ### Klarna Countries ### Production Countries: US Test Countries: No countries selected ### WooCommerce PayPal Payments ### Onboarded: ✔ Shop country code: US WooCommerce currency supported: ✔ PayPal card processing available in country: ✔ Pay Later messaging available in country: ✔ Webhook status: ✔ Vault enabled: ✔ Logging enabled: ✔ Reference Transactions: – Used PayPal Checkout plugin: – Tracking enabled: ✔ ### Admin ### Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products experimental-product-tour shipping-smart-defaults shipping-setting-tour homescreen marketing mobile-app-banner navigation onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions shipping-label-banner subscriptions store-alerts transient-notices wc-pay-promotion wc-pay-welcome-page wc-pay-subscriptions-page Disabled Features: minified-js settings Daily Cron: ✔ Next scheduled: 2022-09-10 04:14:52 -07:00 Options: ✔ Notes: 84 Onboarding: completed ### WooCommerce Payments ### Version: 4.7.0 Connected to WPCOM: Yes Blog ID: 199572252 Account ID: acct_1JuuAC2HWj4HsLHK ### Action Scheduler ### Canceled: 1 Oldest: 2022-09-05 14:56:34 -0700 Newest: 2022-09-05 14:56:34 -0700 Complete: 6,091 Oldest: 2022-08-08 21:44:17 -0700 Newest: 2022-09-08 21:24:10 -0700 Failed: 2 Oldest: 2022-09-05 14:56:34 -0700 Newest: 2022-09-07 07:35:37 -0700 Pending: 10 Oldest: 2022-09-08 21:34:10 -0700 Newest: 2022-09-11 20:15:37 -0700 ### Status report information ### Generated at: 2022-09-08 21:24:41 -07:00 ``` </details> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/haszari"><img src="https://avatars.githubusercontent.com/u/4167300?v=4" />haszari</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>Hi @Mikaylahdreams - thanks for getting in touch. Can you check that all your products and variations in WooCommerce have <code>Manage Stock</code> enabled and <code>Stock quantity</code>>0? Note that you will need to manage stock in and all product info in WooCommerce; if you edit details in Facebook it may affect the sync.</p> <p>Here's an example in my store:</p> <img width="1570" alt="Screen Shot 2021-03-23 at 8 10 38 PM" src="https://user-images.githubusercontent.com/4167300/112109454-7a107480-8c16-11eb-8b89-3fc3091d8c01.png"> <p>If you're still seeing this issue with stock management and stock quantity settings in WooCommerce, please reply to this issue with details of your product and what you see in Facebook. Thank you :)</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/thracefulton"><img src="https://avatars.githubusercontent.com/u/88570946?v=4" />thracefulton</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>In 5543752-zen we have a merchant with products syncing correctly, but not showing as <code>In stock</code> to match the status in WooCommerce. Inventory management is on in WooCommerce, but the logs show that the plugin will only pass <code>Availability</code> status, not inventory counts.</p> <p><a href="https://wordpress.org/support/topic/inventory-count-not-syncing-between-woocommerce-site-and-facebook/#post-12912823">This post</a> suggests that the feed file must be manually edited to add a <code>Inventory</code> field, or the <code>Quantity to sell</code> field manually set to a positive value, in order for the <code>Availablity</code> of <code>In stock</code> to be reflected accurately on Facebook or Instagram catalogs.</p> <p>Is this the case?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/csmcneill"><img src="https://avatars.githubusercontent.com/u/82999806?v=4" />csmcneill</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>5544307-zen</p> <ul> <li>Facebook connection is fine.</li> <li>Enabling logs shows that the <code>availability</code> is <code>in stock</code>.</li> <li>Products are showing as <code>Temporarily Out of Stock</code> on Facebook.</li> <li>Asked the user if they manually update the <code>Quantity to sell</code> to 1 or more on the Facebook Items list there if the products show as in stock.</li> <li>Reached out to engineers in p1662928435740879-slack-C7U3Y3VMY</li> </ul> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/jconroy"><img src="https://avatars.githubusercontent.com/u/355014?v=4" />jconroy</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p><a href="https://wordpress.org/support/topic/inventory-count-not-syncing-between-woocommerce-site-and-facebook/#post-12912823">This post</a> suggests that the feed file must be manually edited to add a Inventory field, or the Quantity to sell field manually set to a positive value, in order for the Availablity of In stock to be reflected accurately on Facebook or Instagram catalogs.</p> </blockquote> <p>@thracefulton That's a very old topic and there has been quite a few changes since then. @rawdreeg @message-dimke can you guys just confirm the expected current handling.</p> <p>@csmcneill @thracefulton I'd recommend trying to replicate behavior and confirming exact details about the products etc. to make it easy for devs to also reproduce. I also see that the main issue above seems to be focused on variations.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Hi @csmcneill,</p> <p>I have had a look:</p> <p>I can't say for sure the issue described is the same as this issue given how long it's been open. I need some clarifications. For e.g.:</p> <ul> <li>is the issue with a variable product or a simple product?</li> <li>Is quantity set on all variations?</li> <li>What is the quantity on the inventory tab of the main (parent) product: <img src="https://user-images.githubusercontent.com/4209011/189604060-5ca78a83-b9be-48cf-8cc7-d74353a40fca.jpg" alt="Screenshot 2022-09-12 at 10 08 20" /></li> </ul> <p>Alternatively, we can to delete and resync the affected product(s) by locating the <a href="https://woocommerce.com/document/facebook-for-woocommerce/#section-27">Facebook Product Sync sidebar box</a>, and using it to Delete product(s) on Facebook so it can resync with the correct data?</p> <p>Let me know if that works.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/foosantos"><img src="https://avatars.githubusercontent.com/u/40555737?v=4" />foosantos</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Hi @rawdreeg, thank you for checking this! I updated the issue description and added an SSR to make it better understood. In general, we can see it also happening with simple products.</p> <p>I'm also asking for some additional details based on your comment, and we will follow up if the merchant replies back to us—this issue has been challenging as we also can't reproduce it.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/csmcneill"><img src="https://avatars.githubusercontent.com/u/82999806?v=4" />csmcneill</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>is the issue with a variable product or a simple product? Is quantity set on all variations? What is the quantity on the inventory tab of the main (parent) product</p> </blockquote> <p>@rawdreeg As @felipelousantos mentioned, this is happening for simple and variable products.</p> <p>In all instances, quantity/stock is properly configured. Here is a screenshot captured by @solstudioim for 5543752-zen that shows the products are properly in stock in WooCommerce but not on Facebook:</p> <p><img src="https://user-images.githubusercontent.com/82999806/189681520-a2c4a5a8-7ac4-49c4-b754-8d9cdf306c3c.png" alt="Markup 2022-09-09 at 09 46 02" /></p> <p>5543752-zen is an AT site so we can confirm that the products are properly configured in WooCommerce.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Thanks for the explanation, @csmcneill, and @felipelousantos,</p> <p>I got a bit curious about the Quantity to Sell field as I have never encountered that before. I think what may be happening is that FB is setting/defaulting this value for some merchants.</p> <p>We only set the availability flag based on whether the qty is > 0 in cases when the stock is manually managed. We do not set inventory information. The Batch API we used to update product information does not even have the <code>Quantity to Sell</code> field documented (See <a href="https://developers.facebook.com/docs/marketing-api/catalog-batch/reference">https://developers.facebook.com/docs/marketing-api/catalog-batch/reference</a>)</p> <p>But if you look at the Feed API documentation, they mention the <code>Quantity to Sell</code> field as a replacement for the inventory field.</p> <p>And FB seems <a href="https://developers.facebook.com/docs/marketing-api/catalog/reference#additional-required-fields">to update this field</a>, at least in some cases.</p> <p><img src="https://user-images.githubusercontent.com/4209011/189717082-ddc6c9a4-4c00-4c7f-9980-7200d190ac28.jpg" alt="Screenshot 2022-09-12 at 19 19 39" /></p> <p>@budzanowski We'll need to bring this up with Meta. Not sure if we need to start setting this value, but at the very least, we'd like to understand why it's not taking into account the availability field.</p> <p>cc: @jconroy @message-dimke </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/johndcoy"><img src="https://avatars.githubusercontent.com/u/55294242?v=4" />johndcoy</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@rawdreeg I believe this is a result of the <a href="https://www.facebook.com/business/help/449169642911614">checkout method</a> "Checkout on Facebook and Instagram". By default, if a user has this option available, the setup wizard is able to prevent the connection to a shop that sells on-site:</p> <p><img src="https://d.pr/i/KAb8i4+" alt="Screenshot" /> Screenshot link: <a href="https://d.pr/i/KAb8i4">https://d.pr/i/KAb8i4</a></p> <p>This doesn't keep a user from enabling that checkout method in the future. With <strong>Checkout on Facebook and Instagram</strong> enabled the store will then show a quantity after connecting to that catalog. This wasn't easy to do since enabling that feature created a new catalog and the wizard identified it as an on-site shop. So, I switch the checkout method to "Checkout on another website" and this allowed me to complete the setup wizard. </p> <p><img src="https://d.pr/i/I0uZKt+" alt="Screenshot" /> Screenshot link: <a href="https://d.pr/i/I0uZKt">https://d.pr/i/I0uZKt</a></p> <p>I toggled the checkout method back to "Checkout on Facebook and Instagram" and the edit item page showed a quantity value:</p> <p><img src="https://d.pr/i/FFHq98+" alt="Screenshot" /> Screenshot link: <a href="https://d.pr/i/FFHq98">https://d.pr/i/FFHq98</a></p> <p>Updates like the product description and title were still sent to Facebook thus updating the product, but the quantity was still 0. This of course is because we are not hooking into <code>quantity_to_sell_on_facebook</code> as you've mentioned. Toggling the checkout method back to "Checkout on another website" removed the quantity field:</p> <p><img src="https://d.pr/i/V2OpeS+" alt="Screenshot" /> Screenshot link: <a href="https://d.pr/i/V2OpeS">https://d.pr/i/V2OpeS</a></p> <p>Hope this helps. </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Thanks @johndcoy.</p> <p>This helps a lot. We've added this to the issues to discuss with meta. Hopefully, they can sort it on their end. Until then, let's recommend the known workaround to customers.</p> <p>Thanks</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/johndcoy"><img src="https://avatars.githubusercontent.com/u/55294242?v=4" />johndcoy</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@rawdreeg They heavily encourage the use of Checkout on Facebook when setting up a shop. With our current integration, maybe we can check if that method is enabled and encourage the user to switch to Checkout on another website. At least until we offer full compatibility with that method.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@johndcoy,</p> <blockquote> <p>They heavily encourage the use of Checkout on Facebook when setting up a shop.</p> </blockquote> <p>Thanks for this insight. I know users that create their shop through the extension are not onboarded into Checkout on Facebook. Any other instance will need to be reported to Meta.</p> <p>I am cc'ing @budzanowski, who might have some insights on the next best steps here.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/chrism245"><img src="https://avatars.githubusercontent.com/u/47186013?v=4" />chrism245</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Reported here as well: 5619401-zen</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/heinsman"><img src="https://avatars.githubusercontent.com/u/7647316?v=4" />heinsman</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I'm seeing this issue as well. Is it still being worked on?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/Babylon1999"><img src="https://avatars.githubusercontent.com/u/67080558?v=4" />Babylon1999</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>One more report in zd-5790734</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/anant1811"><img src="https://avatars.githubusercontent.com/u/8631775?v=4" />anant1811</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Also in 5796585-zen</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/igorhereira"><img src="https://avatars.githubusercontent.com/u/17129824?v=4" />igorhereira</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>5891593-zen</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Based on the feedback above (<a href="https://github.com/woocommerce/facebook-for-woocommerce/issues/1701#issuecomment-1244470563">https://github.com/woocommerce/facebook-for-woocommerce/issues/1701#issuecomment-1244470563</a>), this issue has been escalated to Meta. I will post an update as soon as we have a response.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/anastas10s-afk"><img src="https://avatars.githubusercontent.com/u/73900974?v=4" />anastas10s-afk</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>5900619-zen</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/Brianmitchtay"><img src="https://avatars.githubusercontent.com/u/45057772?v=4" />Brianmitchtay</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Believe I'm seeing the same again in 5903962-zen</p> <p>Asking them to try the workaround.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/igorhereira"><img src="https://avatars.githubusercontent.com/u/17129824?v=4" />igorhereira</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>6006381-zen.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/ericnovak"><img src="https://avatars.githubusercontent.com/u/9614151?v=4" />ericnovak</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>This bug essentially renders the entire Facebook shop experience null and has since 2020. How are people using shops connected to woo without this functionality?! </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/noppie99"><img src="https://avatars.githubusercontent.com/u/57235372?v=4" />noppie99</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Hi i am another person the "out of stock" shows up in my Facebook account. I have uninstalled this many times. I deleted all the products from my store and reconnected it and did a manual resync. I have variations and everything showed up but some did have prices shown and all showed out of stock... I did not at first had the inventory count enabled in each variation. so I added it to two of the items and it still showed out of stock. I do not make a whole lot of money doing this but this is the best time of the year and this not working is not good for me... I use to use ZenCart and it took a while to get it working but the hosting server crashed and I lost my whole site. anyway, so I thought I would try woocommerce because I thought the woo-commerce integration with Facebook would be easier than Zencart. if there is anything I can do to help this plugin to work that would help this plugin just let me know,</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/lynnjat7"><img src="https://avatars.githubusercontent.com/u/109691691?v=4" />lynnjat7</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>6133233-zen looks to be the same issue</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/harishowt"><img src="https://avatars.githubusercontent.com/u/123054406?v=4" />harishowt</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Hello </p> <p>I have the same issue in the simple type product and I have tried the following code in the functions.php. It works for me. Let me know if anyone has the same issue and if the below code works or not.</p> <pre><code>function facebook_sync_issue( $product_data, $id ) { $product = wc_get_product($id); $quantity = $product->get_stock_quantity(); $product_data['inventory'] = $quantity; return $product_data; } add_filter( 'facebook_for_woocommerce_integration_prepare_product', 'facebook_sync_issue', 10, 2 );</code></pre> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/noppie99"><img src="https://avatars.githubusercontent.com/u/57235372?v=4" />noppie99</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>after reading the directions again, and following step by step.. the reason the out of stock showed up was because I had checkout with facebook (I know one would have more sales with that checkout) but at this time woocommerce does not support that. so all is now working as Facebook connects to woocommerce is supposed to work. Now I hope they are working on getting the support to work with facebook checkout.. it would be more sales. anyway thank you all for your hard work.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/noppie99"><img src="https://avatars.githubusercontent.com/u/57235372?v=4" />noppie99</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>@johndcoy,</p> <blockquote> <p>They heavily encourage the use of Checkout on Facebook when setting up a shop.</p> </blockquote> <p>Thanks for this insight. I know users that create their shop through the extension are not onboarded into Checkout on Facebook. Any other instance will need to be reported to Meta.</p> <p>I am cc'ing @budzanowski, who might have some insights on the next best steps here.</p> </blockquote> <p>i am a user of this plugin and really want the checkout through facebook is a good thing, with all the fraud going on... that people are going to trust facebook a little more.. with the hacker type people creating fake websites.. people are more comfortable checking out with facebook.. and the fees are free untill june 23.. so there's that. naomi</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/ericnovak"><img src="https://avatars.githubusercontent.com/u/9614151?v=4" />ericnovak</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Hello</p> <p>I have the same issue in the simple type product and I have tried the following code in the functions.php. It works for me. Let me know if anyone has the same issue and if the below code works or not.</p> <pre><code>function facebook_sync_issue( $product_data, $id ) { $product = wc_get_product($id); $quantity = $product->get_stock_quantity(); $product_data['inventory'] = $quantity; return $product_data; } add_filter( 'facebook_for_woocommerce_integration_prepare_product', 'facebook_sync_issue', 10, 2 );</code></pre> </blockquote> <p>How exactly does this work? Is it pulling the stock quantity and then changing it to the correct Facebook format?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/harishowt"><img src="https://avatars.githubusercontent.com/u/123054406?v=4" />harishowt</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@ericnovak It pulls the stock quantity from the product and adds the <strong>inventory</strong> which is needed for Facebook shop to synchronize. </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/noppie99"><img src="https://avatars.githubusercontent.com/u/57235372?v=4" />noppie99</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>does this work with variations too.. and then you can enable the facebook checkout? because my works if I dont have the facebook checkout working?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>FYI, the inventory field has been replaced with <a href="https://developers.facebook.com/docs/marketing-api/catalog/reference#additional-required-fields"><code>quantity_to_sell_on_facebook</code></a>.</p> <p>We don't set this specific value as we have no way of tracking inventory across FB checkout and the WooCommerce store as we do not support Facebook checkout in this integration. In addition, quantity_to_sell_on_facebook can only be a number; it becomes tricky when a product doesn't have the "manage stock" option enabled, so this number must be arbitrary to make the Facebook API happy. We believe this is a bug and have been talking to Facebook to correct it. </p> <p>Facebook gives us the <code>availability</code>, which should supersede <code>quantity_to_sell_on_facebook</code>; but it doesn't. </p> <p>Another thing Facebook does is it defaults the <code>quantity_to_sell_on_facebook</code> to 0 when a FB shop has enabled Facebook checkout. In this case, the solution offered by @ericnovak should work fine. Just make sure you use $product_data['quantity_to_sell_on_facebook'] instead.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/noppie99"><img src="https://avatars.githubusercontent.com/u/57235372?v=4" />noppie99</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>I feel really stupid.. but not sure what file to put in.. </p> <p>function facebook_sync_issue( $product_data, $id ) {<br /> $product = wc_get_product($id); $quantity = $product->get_stock_quantity();<br /> $product_data['inventory'] = $quantity; return $product_data; } add_filter( 'facebook_for_woocommerce_integration_prepare_product', 'facebook_sync_issue', 10, 2 );</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/harishowt"><img src="https://avatars.githubusercontent.com/u/123054406?v=4" />harishowt</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>@noppie99 You can add this in the functions.php file on the child theme</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/xplicitcoding"><img src="https://avatars.githubusercontent.com/u/15234972?v=4" />xplicitcoding</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Just to sum up the script to put in the functions.php file because @rawdreeg mentioned the change to "quantity_to_sell_on_facebook", </p> <p>//pulls the stock quantity from the product and adds the inventory which is needed for Facebook shop to synchronize function facebook_sync_issue( $product_data, $id ) {<br /> $product = wc_get_product($id); $quantity = $product->get_stock_quantity();<br /> $product_data['quantity_to_sell_on_facebook'] = $quantity; return $product_data; } add_filter( 'facebook_for_woocommerce_integration_prepare_product', 'facebook_sync_issue', 10, 2 );</p> <p>Side note, doesn't work for variable products, just simple ones. </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/jackesito"><img src="https://avatars.githubusercontent.com/u/143187220?v=4" />jackesito</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p>Hello, thank you very much for the contributions. Do you know if this addition to functions.php still works?</p> <p>Because I have added it but when I synchronize I do not see the updated stocks.</p> <p>thank you!</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/WilliamWhispell"><img src="https://avatars.githubusercontent.com/u/1390230?v=4" />WilliamWhispell</a> commented <strong> 1 year ago</strong> </div> <div class="markdown-body"> <p><a href="https://github.com/woocommerce/facebook-for-woocommerce/files/12541933/woo-fb-fix.zip">woo-fb-fix.zip</a></p> <p>I'm using a plugin to set quantity_to_sell_on_facebook - Sets it to 100 if in stock, otherwise sets to 0. It also sets size on each variant.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/shrutimoorthy"><img src="https://avatars.githubusercontent.com/u/27932389?v=4" />shrutimoorthy</a> commented <strong> 11 months ago</strong> </div> <div class="markdown-body"> <p>7145765-zen seems to have the same issue.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/aroberts2141"><img src="https://avatars.githubusercontent.com/u/155771852?v=4" />aroberts2141</a> commented <strong> 8 months ago</strong> </div> <div class="markdown-body"> <p>Hello, I am having the same issues as on here, I implemented the above code from @xplicitcoding but as they say, the code doesn't work for variations. How can I sync the stock quantity for variations</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/noppie99"><img src="https://avatars.githubusercontent.com/u/57235372?v=4" />noppie99</a> commented <strong> 8 months ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Hello, I am having the same issues as on here, I implemented the above code from @xplicitcoding but as they say, the code doesn't work for variations. How can I sync the stock quantity for variations</p> </blockquote> <p>i got this working for the most part. I have the code in my functions.php too. do you have inside of the variations you have set the quantity in there too?<br /> <img src="https://github.com/woocommerce/facebook-for-woocommerce/assets/57235372/75eb5dcc-dca2-4f75-9194-eb1ba3e1983b" alt="Screenshot_20240105_122012" /></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/aroberts2141"><img src="https://avatars.githubusercontent.com/u/155771852?v=4" />aroberts2141</a> commented <strong> 8 months ago</strong> </div> <div class="markdown-body"> <p>@noppie99 Yes, I have the quantity set up in each variation.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/theabhig"><img src="https://avatars.githubusercontent.com/u/75635198?v=4" />theabhig</a> commented <strong> 7 months ago</strong> </div> <div class="markdown-body"> <p>Also in 7599077-zen </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/sverleis"><img src="https://avatars.githubusercontent.com/u/16252298?v=4" />sverleis</a> commented <strong> 3 months ago</strong> </div> <div class="markdown-body"> <p>8165987-zen experiencing this.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/mreespinosa"><img src="https://avatars.githubusercontent.com/u/172386413?v=4" />mreespinosa</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>This topic has been up since 2020. Can you update us with what is the most recent update on solving the issue with the quantity not syncing to Facebook? </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>Thanks for reaching out, @mreespinosa. As stated in <a href="https://github.com/woocommerce/facebook-for-woocommerce/issues/1701#issuecomment-1244061693">https://github.com/woocommerce/facebook-for-woocommerce/issues/1701#issuecomment-1244061693</a>, Meta introduced quantity_to_sell field for tracking inventory value and is defaulting this to 0 if no value is provided, and they seem to ignore the availability value.</p> <p>A temporary solution is to use a workaround like the one proposed by @WilliamWhispell: <a href="https://github.com/woocommerce/facebook-for-woocommerce/issues/1701#issuecomment-1709010570">https://github.com/woocommerce/facebook-for-woocommerce/issues/1701#issuecomment-1709010570</a></p> <p>Thanks,</p> <p>R</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/mreespinosa"><img src="https://avatars.githubusercontent.com/u/172386413?v=4" />mreespinosa</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Thanks for reaching out, @mreespinosa. As stated in <a href="https://github.com/woocommerce/facebook-for-woocommerce/issues/1701#issuecomment-1244061693">#1701 (comment)</a>, Meta introduced quantity_to_sell field for tracking inventory value and is defaulting this to 0 if no value is provided, and they seem to ignore the availability value.</p> <p>A temporary solution is to use a workaround like the one proposed by @WilliamWhispell: <a href="https://github.com/woocommerce/facebook-for-woocommerce/issues/1701#issuecomment-1709010570">#1701 (comment)</a></p> <p>Thanks,</p> <p>R</p> </blockquote> <p>I understand it is defaulting to 0 i no quantity is provided but I am providing quantity and it still is defaulting to 0. That plugin is going to set all products to 100 stock ? I only want delected products to be updated because I have out of stock products that should not have any stock. What do you advise?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <p>@mreespinosa</p> <blockquote> <p>I understand it is defaulting to 0 i no quantity is provided, but I am providing quantity.</p> </blockquote> <p>Facebook for WooCommerce does not send a quantity_to_sell value as that depends on Facebook/Checkout checkout which we do not currently support. This is why Meta defaults this value to 0.</p> <blockquote> <p>That plugin is going to set all products to 100 stock ?</p> </blockquote> <p>I have looked at the code and it will set the stock to 100 if the product has stock available, otherwise it sets it to 0.</p> <pre><code>$product_data['quantity_to_sell_on_facebook'] = $product->is_in_stock() ? 100 : 0;</code></pre> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/mreespinosa"><img src="https://avatars.githubusercontent.com/u/172386413?v=4" />mreespinosa</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <blockquote> <p>@mreespinosa</p> <blockquote> <p>I understand it is defaulting to 0 i no quantity is provided, but I am providing quantity.</p> </blockquote> <p>Facebook for WooCommerce does not send a quantity_to_sell value as that depends on Facebook/Checkout checkout which we do not currently support. This is why Meta defaults this value to 0.</p> <blockquote> <p>That plugin is going to set all products to 100 stock ?</p> </blockquote> <p>I have looked at the code and it will set the stock to 100 if the product has stock available, otherwise it sets it to 0.</p> <pre><code>$product_data['quantity_to_sell_on_facebook'] = $product->is_in_stock() ? 100 : 0;</code></pre> </blockquote> <p>What do you recommend we do if the actual quantity we have of the products are less than 100?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/mreespinosa"><img src="https://avatars.githubusercontent.com/u/172386413?v=4" />mreespinosa</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <blockquote> <p>@mreespinosa</p> <blockquote> <p>I understand it is defaulting to 0 i no quantity is provided, but I am providing quantity.</p> </blockquote> <p>Facebook for WooCommerce does not send a quantity_to_sell value as that depends on Facebook/Checkout checkout which we do not currently support. This is why Meta defaults this value to 0.</p> <blockquote> <p>That plugin is going to set all products to 100 stock ?</p> </blockquote> <p>I have looked at the code and it will set the stock to 100 if the product has stock available, otherwise it sets it to 0.</p> <pre><code>$product_data['quantity_to_sell_on_facebook'] = $product->is_in_stock() ? 100 : 0;</code></pre> </blockquote> <p>In other words, is it possible to only set quantity to 100 if the Wordpress Woocommerce stock is set to 0?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rawdreeg"><img src="https://avatars.githubusercontent.com/u/4209011?v=4" />rawdreeg</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <blockquote> <p>What do you recommend we do if the actual quantity we have of the products are less than 100?</p> </blockquote> <p>Any non-zero value should do.</p> <p>And if you have enabled the <code>manage stock</code> option and have added a stock quantity, you could do something like:</p> <p>(Line 67 replacing <code>$product_data['quantity_to_sell_on_facebook'] = $product->is_in_stock() ? 100 : 0;</code>)</p> <pre><code> $stock_value = $product->is_in_stock() ? 100 : 0; if ( $product->managing_stock() ) { $stock_value = (int) max( 0, $this->woo_product->get_stock_quantity() ); } $product_data['quantity_to_sell_on_facebook'] = $stock_value; </code></pre> <p>This would be set to 100 if the product is marked in stock but <code>manage stock</code> is not enabled. If you have enabled the <code>manage stock</code> option and have added a stock quantity, it will use the actual stock quantity.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/mreespinosa"><img src="https://avatars.githubusercontent.com/u/172386413?v=4" />mreespinosa</a> commented <strong> 2 months ago</strong> </div> <div class="markdown-body"> <blockquote> <p>This would be set to 100 if the product is marked in stock but <code>manage stock</code> is not enabled. If you have enabled the <code>manage stock</code> option and have added a stock quantity, it will use the actual stock quantity.</p> </blockquote> <p>By the way, I have variable products. Do we simply add the woo-fb-fix.zip code into the functions.php ?</p> </div> </div> <div class="page-bar-simple"> <a href="/woocommerce/facebook-for-woocommerce/1701?page=2" class="next">Next</a> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>