Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Sync stock quantity when available #2811

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

mshymon
Copy link

@mshymon mshymon commented Oct 3, 2024

Changes proposed in this Pull Request:

This change suggests to always sync to Meta the stock quantity when it is available.

Screenshots:

N/A (no changes to UI/UX)

Detailed test instructions:

  1. Run new tests
    ./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_on_for_simple_product
    ./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_off_for_simple_product
    ./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_on_for_variable_product
    ./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_off_for_variable_product_and_off_for_parent
    ./vendor/bin/phpunit --filter test_quantity_to_sell_on_facebook_when_manage_stock_is_off_for_variable_product_and_on_for_parent

  2. Run all tests
    npm run test:php

  3. 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. Tested on both simple and variable products.

Changelog entry

Fix - Sync stock quantity when available

@rawdreeg rawdreeg requested a review from a team November 4, 2024 12:14
Copy link
Contributor

@rawdreeg rawdreeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for submitting this fix, @mshymon. The changes work as described.

I left some small comments related to PHP coding style fixes. I'll approve so long.

includes/fbproduct.php Outdated Show resolved Hide resolved
includes/fbproduct.php Outdated Show resolved Hide resolved
includes/fbproduct.php Outdated Show resolved Hide resolved
includes/fbproduct.php Outdated Show resolved Hide resolved
Co-authored-by: Rodrigue <rawdreeg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants