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
211 stars 140 forks source link

Fix - Sync product GTIN when available #2810

Open mshymon opened 1 month ago

mshymon commented 1 month ago

Changes proposed in this Pull Request:

This change suggests to sync to Meta a product GTIN when it is available.

Screenshots:

N/A (no changes to UI/UX)

Detailed test instructions:

  1. Run new tests ./vendor/bin/phpunit --filter test_gtin_for_simple_product_set ./vendor/bin/phpunit --filter test_gtin_for_simple_product_unset ./vendor/bin/phpunit --filter test_gtin_for_variable_product_set ./vendor/bin/phpunit --filter test_gtin_for_variable_product_unset

  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 "gtin" populated correctly. Tested on both simple and variable product.

Changelog entry

Fix - Sync product GTIN when available.