Open jonkinesis opened 7 months ago
Any updates on this? I have a very unhappy customer right now for my web design business because the items on the synced Facebook store all show out of stock :(
Also seems to be the case in 8321973-zen
8392230-zd-a8c
8418948-zen 8394619-zen
I wonder if they are affected by this: https://wordpress.org/support/topic/incompatibility-with-checkout-on-facebook-instagram-us-only/
8447003-zen
If you are facing this issue, please check your checkout method in Commerce Manager. Here's how you can do that: https://www.facebook.com/business/help/242644617460119
For countries outside of the US, this option should be set to "checkout on another website" when working with the Facebook for WooCommerce plugin. This will redirect shoppers on Facebook to your own website for purchase and checkout.
In the United States, checkout on other websites is no longer supported as of April 2024.
If you are building a storefront on the Facebook side, you likely have this setting set to "checkout on Facebook and Instagram."
In this case, please note that WooCommerce will push product information onto Facebook for use in building the shop, but does not send across inventory numbers. This is because Facebook cannot send notice of sales back to your website, so inventory numbers quickly become out of sync. WooCommerce will continue to push information to Facebook which may override information on Facebook sales, and products on your site will not be updated with any Facebook sales.
For this reason, WooCommerce only pushes information regarding "available / unavailable" for products, not the actual inventory numbers.
If products are marked in WooCommerce to "manage stock" and have a stock value that is above zero, they will be marked as "available" when sending the information to Facebook. However, we have seen that Facebook does interpret this as "available - inventory zero" which can be marked as "out of stock" on their side. We are working with them to resolve this bug in Meta. Products that do not use stock management on the WooCommerce side should likewise be pushed to Facebook as "available" but this may be misinterpreted on the Facebook side.
In general, we are only recommending using the Facebook for WooCommerce plugin in the United States as a catalog feed for creating ads, and not as the source of data for your live shop at this time. However, if you would like to try it, other WooCommerce users have offered this snippet as a potential workaround.
Please note that this snippet is not created by WooCommerce and would not be supported by their customer support channels. To use this snippet, you could use a free plugin like Code Snippets to drop this code into your site without altering your theme.
function facebook_sync_issue( $product_data, $id ) {
$product = wc_get_product($id);
$stock_value = $product->is_in_stock() ? 100 : 0;
if ( $product->managing_stock() ) {
$stock_value = (int) max( 0, $product->get_stock_quantity() );
}
$product_data['quantity_to_sell_on_facebook'] = $stock_value;
return $product_data;
}
add_filter( 'facebook_for_woocommerce_integration_prepare_product', 'facebook_sync_issue', 10, 2 );
Note that this snippet will push initial inventory numbers across and will use a default value of "100" for any products that are not actively managing inventory. But these numbers will not be cross-updated between Facebook and your shop, so by allowing sales in both places, managing actual inventory numbers is going to become a manual challenge.
8555048-zen
8997297-zen 8998328-zen 8998416-zen 9009634-zen
It seems that the quantity to sell (stock) is not syncing from the plugin to the shop.
π Isolate the bug
βοΈ Describe the bug
πΆββοΈ Steps to reproduce
βοΈ Expected behavior
π Logs