This change suggests to always sync to Facebook the stock quantity if is it available.
Earlier this was sent only if default country is USA. Also this PR removes unnecessary UX of a checkbox "Sell on Instagram" which was really a control whether to send stock quantity to Facebook. So, basically this PR suggests to treat stock quantity as any other product data (e.g. price or description) and just send it when available.
Screenshots:
Detailed test instructions:
New tests
./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_on./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_off
All tests
npm run test:php
Lint
./vendor/bin/phpcs
Manual testing. I tested this in the locally hosted WP WooCommerce website and checked logs on Meta side to verify the request is being sent with the "quantity_to_sell_on_facebook" populated correctly.
Changes proposed in this Pull Request:
This change suggests to always sync to Facebook the stock quantity if is it available. Earlier this was sent only if default country is USA. Also this PR removes unnecessary UX of a checkbox "Sell on Instagram" which was really a control whether to send stock quantity to Facebook. So, basically this PR suggests to treat stock quantity as any other product data (e.g. price or description) and just send it when available.
Screenshots:
Detailed test instructions:
./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_on
./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_off
npm run test:php
./vendor/bin/phpcs
Additional details:
Fix - Always send stock quantity when available.
Changelog entry