Merged
Conversation
Contributor
tzahgr
commented
Apr 17, 2025
- Tweak - Added external_variant_id to the feed file by @mshymon in Added external_variant_id to the feed file #2998
- Tweak - Added support for syncing product type by @vinkmeta in Added support for syncing product type #3013
- Tweak - Relocating bulk actions by @SayanPandey in Relocating bulk actions #2943
- Tweak - Filtration on All Products page | Synced and Not Synced by @SayanPandey in Filtration on All Products page | Synced and Not Synced #2999
- Tweak - Updated PR Template by @vinkmeta in Updated PR Template #3019
- Fix - Null check exceptions by @vinkmeta in Fixed Null check exceptions #3015
- Tweak - Relaxing sync validations by @raymon1 in Relaxing sync validation #2969
- Tweak - Truncates extra characters from title and description by @raymon1 in Feature/truncate title description #3023
- Tweak - Updated PR template by @vinkmeta in Updated PR template #3053
- Fix - The item not found error by using filter in the product endpoint @vinkmeta in Fixed the item not found error by using filter in the product endpoint #3054
- Fix - Bug where MPN input box had no tooltip by @devbodaghe in fix: Update descriptive tooltip for MPN text input #3034
- Tweak - Investigation: WooCommerce to Facebook Product Attribute Syncing by @devbodaghe in docs: Document get_unmapped_attributes from Woo to Meta #3033
- Fix - Add parent product material inheritance for variations by @devbodaghe in fix: Add parent product material inheritance for variations #3035
- Fix - Tooltip Messages for Skirt Length and Sleeve Length by @devbodaghe in fix: mismatch between tooltip messages for Skirt Length and Sleeve Le… #3039
- Fix - Typo in Admin.php by @SayanPandey in Fixing meta to Meta #3063
Summary: ## Description Earlier the external_variant_id (a Woo product ID by value) was added to sync via Batch API. This is a quick follow up to add it to the feed file generation too. ### Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist - [ ] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added tests and all the new and existing unit tests pass locally with my changes - [ ] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. ## Changelog entry - Added external_variant_id to the feed file Pull Request resolved: #2998 Test Plan: Tested manually by triggering feed file generation, verified both the generated feed file and there are no feed ingestion errors via Meta internal tooling. Differential Revision: D72305993 Pulled By: mshymon fbshipit-source-id: 6b941d55147e4f7e75a5ee56a4d5d5ca1323c18b
Summary: ## Description Added support for syncing product type ### Type of change Please delete options that are not relevant. - New feature (non-breaking change which adds functionality) ## Checklist - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added tests and all the new and existing unit tests pass locally with my changes - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. ## Changelog entry Added supoprt for syncing product type Pull Request resolved: #3013 Reviewed By: francorisso Differential Revision: D72458284 Pulled By: vinkmeta fbshipit-source-id: 54621d04f97dc48fb427fd2734b269108fed1cbb
Summary: Relocating the bulk facebook sync options to edit panel Removal of bulk sync controls form the panel.    1. Create few products in WooCommerce 2. Go to the products tab and make some products 3. Now select multiple products and click on edit in bulk options dropdown 4. Click apply 5. Edit panel should open 6. On the right observe Facebook Sync dropdown 7. Select your choice 8. Now click Blue update button Pull Request resolved: #2943 Reviewed By: vinkmeta Differential Revision: D71134957 Pulled By: SayanPandey fbshipit-source-id: 7adf6b86a55108b78dd23407b616908bc074ce87
Summary: This PR includes the changes of the filtration logic at All Products page 1. We will simplify it by providing 2 options 2. `Synced` will show which facebook items are synced -> both `Sync and show` and `Sync and hide` 3. `Not Synced` will show which are the products that are previously `Do not sync`. - [x] New feature (non-breaking change which adds functionality) - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have added tests and all the new and existing unit tests pass locally with my changes - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. Pull Request resolved: #2999 Test Plan: Follow the steps to test: 1. Make few products 2. Mark some of them `Sync and hide` or `Sync and show` 3. Mark some as `Do not sync` 4. Go to all products page 5. Look for the filter says `Filter by synced to meta` 6. Use it :)   Reviewed By: vinkmeta Differential Revision: D72311890 Pulled By: SayanPandey fbshipit-source-id: d9b41f5df799d3ae9b32e9f9532920660baa2da0
Summary: ## Description Updated PR Template ### Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added tests and all the new and existing unit tests pass locally with my changes - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. ## Changelog entry Updated PR Template Pull Request resolved: #3019 Reviewed By: gurtejrehal Differential Revision: D72530023 Pulled By: vinkmeta fbshipit-source-id: aa35b6e2b23e111f8576ce8ad9382418b991647b
Summary: Fixed Null check exceptions highlighted in the [issue](#2829) Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added tests and all the new and existing unit tests pass locally with my changes - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. Fixed Null check exceptions Pull Request resolved: #3015 Reviewed By: gurtejrehal Differential Revision: D72474455 Pulled By: vinkmeta fbshipit-source-id: 87bad39af29107639ce6cf5f501d4874d58b0724
Summary: ## Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. ### Type of change Please delete options that are not relevant. - [X] New feature (non-breaking change which adds functionality) | # | Field | Validation | Change | | --- | --- | --- | ---| | 1 | Description | ALL Cap | Remove | | 2 | Description | length(5000) | Remove | | 3 | Price | If missing | Remove| | 4 | Title | length(150) | Remove | | 5 | validate_product_visibility | if hidden| Keep for now (we need to sync items as hidden in case they are not visible) | | 6 | Out of stock | if woocommerce_hide_out_of_stock_items we don't sync | Removed in another PR | | 7 | product_status | ALL Cap | Keep (part of other efforts) | | 8 | validate_product_sync_field| | Keep | | 9 | validate_product_terms| Check whether the product's categories or tags (terms) exclude it from sync.| Keep | Note: I am not super sure about (5) validate_product_visibility, I have removed it, but the item is being synced as active ## Screenshots Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate ### Before In the before nothing synced showing error in the meta_box component ### After <img width="1280" alt="image" src="https://github.com/user-attachments/assets/195d2190-cbbb-493c-aee4-94a9fb0bbaf8" /> https://www.facebook.com/commerce/catalogs/955650953442091/products As you can see, I have synced items with different validations to ensure syncing is happening ## Test instructions Create a product with a validation issue and try saving and check if it's being synced or not ## Checklist - [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)) - [X] I have commented my code, particularly in hard-to-understand areas - [X] I have added tests and all the new and existing unit tests pass locally with my changes - [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. ## Changelog entry Relaxing sync validations Pull Request resolved: #2969 Reviewed By: vinkmeta Differential Revision: D71912613 Pulled By: raymon1 fbshipit-source-id: 8e358749664d426f809711a889a6665d257f9a4c
Summary: ## Description in #2969 the validations were relaxed, this might cause some backend issues. In this diff, in order to sync products, we are truncating any extra characters form the title and description ### Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [X] I have commented my code, particularly in hard-to-understand areas. - [X] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [X] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [X] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [X] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [X] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Truncates extra characters from title and description Pull Request resolved: #3023 Test Plan: Create item with more than the limits of 150 character for title and more than 5000 for description Before: The title/description will be missing if both title and description are above limit, the item won't be synced After: Truncates (title/description) <img width="2056" alt="image" src="https://github.com/user-attachments/assets/4eb494c7-d070-485a-8b6d-e9ff187fedfb" /> synced <img width="2056" alt="image" src="https://github.com/user-attachments/assets/01b0a61d-3fe2-4a92-9a01-e2e263ad76a5" /> ## Screenshots Please provide screenshots or snapshots of the system/state both before and after implementing the changes, if appropriate ### Before ### After Reviewed By: vinkmeta, SayanPandey Differential Revision: D72567584 Pulled By: raymon1 fbshipit-source-id: 17a6b279f1a3ce5d55237b885c3d349b9b6abdfb
Summary: ## Description Updated PR template ### Type of change Please delete options that are not relevant. - Syntax change (non-breaking change which fixes code modularity, linting or phpcs issues) ## Checklist - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Updated PR template Pull Request resolved: #3053 Differential Revision: D72936088 Pulled By: vinkmeta fbshipit-source-id: edcd0143efdfab8f522f76db72bee49bc40314ab
#3054) Summary: ## Description Fixed the item not found error by using filter in the product endpoint ### Type of change Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Fixed the item not found error by using filter in the product endpoint Pull Request resolved: #3054 Test Plan: npm run test:php Reviewed By: gurtejrehal Differential Revision: D72944229 Pulled By: vinkmeta fbshipit-source-id: fbfabe38bf0ef4e50424ab445e7e6d5a29f142af
Summary: ## Description Fixed bug where MPN input box had no tooltip #Before <img width="830" alt="Screenshot 2025-04-09 at 16 48 51" src="https://github.com/user-attachments/assets/cc76ed53-3256-480a-9ffd-5ae16870b67e" /> #After <img width="992" alt="Screenshot 2025-04-09 at 16 49 06" src="https://github.com/user-attachments/assets/fc8aac34-0989-4bfd-b3a6-55a0b5ca5d70" /> Pull Request resolved: #3034 Reviewed By: SayanPandey Differential Revision: D72721454 Privacy Context Container: L1313315 Pulled By: devbodaghe fbshipit-source-id: 5b6d48fbd3c14f0dd12760973f979263fecef43f
Summary:
This investigation documents how the `get_unmapped_attributes()` function handles the synchronization of WooCommerce product attributes that aren't explicitly mapped to standard Facebook catalog fields.
The `get_unmapped_attributes()` method in `WC_Facebook_Product` class:
```php
public function get_unmapped_attributes() {
$unmapped_attributes = array();
$attributes = $this->woo_product->get_attributes();
foreach ($attributes as $attribute_name => $_) {
$value = $this->woo_product->get_attribute($attribute_name);
if (!empty($value)) {
$mapped_field = $this->check_attribute_mapping($attribute_name);
if ($mapped_field === false) {
$unmapped_attributes[] = array(
'name' => $attribute_name,
'value' => $value
);
}
}
}
return $unmapped_attributes;
}
```
1. **Collection**: Retrieves all WooCommerce product attributes
2. **Filtering**:
- Checks each attribute for non-empty values
- Verifies if attribute is mapped to a Facebook field
3. **Storage**:
- Stores unmapped attributes in array format
- Preserves both name and value pairs
Comprehensive test cases verify:
- Empty attribute handling
- Mapped vs unmapped attribute differentiation
- Mixed attribute scenarios
- Value validation
- ✅ Only processes attributes with non-empty values
- ✅ Excludes attributes mapped to standard Facebook fields
- ✅ Maintains original attribute names and values
- ✅ Works with both simple and variable products
```php
$facebook_product = new WC_Facebook_Product($product);
$unmapped_attributes = $facebook_product->get_unmapped_attributes();
// Returns:
[
['name' => 'weight', 'value' => '2kg'],
['name' => 'style', 'value' => 'Modern']
]
```
- `check_attribute_mapping()`: Validates attribute mapping status
- Facebook catalog field mappings
- WooCommerce attribute management
- Product meta storage
Test cases confirm proper handling of:
- Products with no attributes
- Products with only mapped attributes
- Products with only unmapped attributes
- Products with mixed attribute types
- Empty attribute values
This investigation provides foundation for:
- Improving attribute sync documentation
- Enhancing mapping configurations
- Optimizing attribute processing
- Extending test coverage
Pull Request resolved: #3033
Reviewed By: vinkmeta
Differential Revision:
D72707817
Privacy Context Container: L1313315
Pulled By: devbodaghe
fbshipit-source-id: 0e66df271750005c8f2da74efde4e74db0759ceb
Summary:
## Description
This PR fixes an inconsistency in how product material attributes are handled for variable products in the Facebook for WooCommerce sync process. Previously, variations would not inherit their parent product's material attribute, unlike other attributes such as color and size.
### What Changed
- Added parent fallback logic to `get_fb_material()` method
- Variations now check parent product's material value if no variation-specific material is set
- Maintains existing string sanitization and length limits
### Before
```php
// Only checked variation attributes and direct meta
$fb_material = get_post_meta($this->id, self::FB_MATERIAL, true);
```
### After
```php
// Now includes parent fallback like other attributes
if (empty($fb_material) && $this->is_type('variation')) {
$parent_id = $this->get_parent_id();
if ($parent_id) {
$fb_material = get_post_meta($parent_id, self::FB_MATERIAL, true);
}
}
```
### Testing
1. Create a variable product with a material set at the parent level
2. Create variations without specific material values
3. Verify variations inherit the parent's material when syncing to Facebook
4. Verify variations with their own material values still use their specific value
### Related Issues
- Fixes inconsistent material attribute syncing for variable products
- Aligns material handling with other product attributes
Pull Request resolved: #3035
Reviewed By: vinkmeta
Differential Revision:
D72733411
Privacy Context Container: L1313315
Pulled By: devbodaghe
fbshipit-source-id: 28483bffcdc0563d1af8e98748e8d3a35e9da9b9
#3039) Summary: allow-large-files # Fix Tooltip Messages for Skirt Length and Sleeve Length ## Issue The tooltip messages for Skirt Length and Sleeve Length were incorrectly swapped, causing confusion for users. ## Changes - Corrected tooltip text for Skirt Length to properly describe skirt measurements - Corrected tooltip text for Sleeve Length to properly describe sleeve measurements ## Testing - Verified tooltips display correct information when hovering over each field <img width="578" alt="Screenshot 2025-04-10 at 16 00 09" src="https://github.com/user-attachments/assets/d9fd58fe-fefa-4f6c-8325-544c825bd1aa" /> <img width="470" alt="Screenshot 2025-04-10 at 16 00 00" src="https://github.com/user-attachments/assets/5f9fd8c1-3d73-40fb-bcce-c89b9e9b83d2" /> Pull Request resolved: #3039 Reviewed By: SayanPandey, gurtejrehal Differential Revision: D72794796 Pulled By: devbodaghe fbshipit-source-id: f4acad7cdd227bacdbd6b9facda4612da9f2c705
Summary: ## Description Just changin meta to Meta ### Type of change String fix Pull Request resolved: #3063 Reviewed By: vinkmeta Differential Revision: D73177989 Pulled By: SayanPandey fbshipit-source-id: 003cfa41d40482964c5c400963e28dc62e0e924b
…product data (#3029) Summary: This PR modifies how product descriptions are synced to Facebook by sending the short description as a separate field rather than using it as a fallback for the main description. This change allows both description types to be utilized independently in the Facebook catalog. - Added `short_description` field to product data sent to Facebook - Modified `get_fb_short_description()` method to handle variation products consistently with main description - Added fallback logic for variation products to use parent product's short description when needed - Maintained separation between main description and short description fields Previously, short descriptions were only used as a fallback when the main description was empty or when specifically configured to use short descriptions instead of main descriptions. Now both descriptions are sent to Facebook as separate fields: - `description`: Contains the main product description - `short_description`: Contains the product's short description - Both fields maintain their own content and fallback logic - [ ] Verify that both main and short descriptions are sent to Facebook - [ ] Test with variation products to ensure proper fallback behavior - [ ] Confirm that existing product syncs continue to work as expected - [ ] Verify that products with only one description type still sync correctly This change provides more flexibility in how product descriptions are displayed on Facebook, allowing merchants to utilize both description types for different purposes in their product catalog. This PR adds comprehensive test cases for the Facebook product short description functionality (`get_fb_short_description()` method). The tests ensure the method behaves correctly across various product types and scenarios. - **Variation inheritance**: Verifies that product variations correctly inherit short descriptions from parent products (even when variations attempt to set their own descriptions) - **Simple product descriptions**: Confirms short descriptions are properly retrieved from product excerpts - **Empty description handling**: Tests that empty short descriptions return empty strings - **Filter application**: Validates the `facebook_for_woocommerce_fb_product_short_description` filter hook works correctly These tests help ensure reliable product information display when syncing to Facebook catalog and maintain consistency with WooCommerce's product description behavior. Pull Request resolved: #3029 Differential Revision: D72671275 Privacy Context Container: L1313315 Pulled By: devbodaghe fbshipit-source-id: 177fd103bf4768af2a88a67cb20e9bc7c42ac369
Summary: This PR modifies how product descriptions are synced to Facebook by sending the short description as a separate field rather than using it as a fallback for the main description. This change allows both description types to be utilized independently in the Facebook catalog. - Added `short_description` field to product data sent to Facebook - Modified `get_fb_short_description()` method to handle variation products consistently with main description - Added fallback logic for variation products to use parent product's short description when needed - Maintained separation between main description and short description fields Previously, short descriptions were only used as a fallback when the main description was empty or when specifically configured to use short descriptions instead of main descriptions. Now both descriptions are sent to Facebook as separate fields: - `description`: Contains the main product description - `short_description`: Contains the product's short description - Both fields maintain their own content and fallback logic - [ ] Verify that both main and short descriptions are sent to Facebook - [ ] Test with variation products to ensure proper fallback behavior - [ ] Confirm that existing product syncs continue to work as expected - [ ] Verify that products with only one description type still sync correctly This change provides more flexibility in how product descriptions are displayed on Facebook, allowing merchants to utilize both description types for different purposes in their product catalog. Pull Request resolved: #3031 Reviewed By: vinkmeta Differential Revision: D72671491 Pulled By: devbodaghe fbshipit-source-id: 4a56db94bb699689ed41b768048014bba2aa7340
Summary: ## Feature: Short Description Fallback This pull request introduces a new feature to the `WC_Facebook_Product` class, specifically enhancing the `get_fb_short_description` method. The method now includes logic to use the main product description as the short description when the main description is less than 50 characters. ### Changes - **Modified `get_fb_short_description` Method:** - For variation products, if no short description is found, the method now checks if the main description is less than 50 characters and uses it as the short description. - For regular products, if no short description (excerpt) is found, the method checks if the main description is less than 50 characters and uses it as the short description. ### Benefits - Ensures that products with very short main descriptions can still have a meaningful short description. - Improves the consistency and completeness of product data sent to Facebook. ### Testing - Verified that the short description is correctly populated from the main description when it is less than 50 characters. - Ensured that existing functionality remains unaffected for products with longer descriptions. ### Notes - This change does not affect any other parts of the plugin and maintains backward compatibility. Pull Request resolved: #3048 Reviewed By: vinkmeta Differential Revision: D72866715 Pulled By: devbodaghe fbshipit-source-id: 87fe2e362dcc025b2633894f930afa9cbd9a174d
Summary: Just changin meta to Meta String fix Pull Request resolved: #3063 Reviewed By: vinkmeta Differential Revision: D73177989 Pulled By: SayanPandey fbshipit-source-id: 003cfa41d40482964c5c400963e28dc62e0e924b
Summary: Added a hook to woocommerce_new_order event to ensure we track Purchase events through different flows. Also added a flag to the order metadata to track whether a Purchase event has been sent for this order or not. Added more hooks to track if an event's status changed from on-hold or pending to processing or completed through the WP dashboard. Also fixed a phpcs warning in AAMSettings.php file ## Description This PR is addressing the gap in Purchase events being sent by this plugin compared to GTM & Stape. The details are explained in this doc: https://fburl.com/gdoc/ihoi9jna ### Type of change Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Fixed a problem where Purchase event was not firing if thankyou page was not shown, Custom payment provider or order management plugin used, or Purchase state updated through Woo dashboard Pull Request resolved: #3060 Test Plan: On a woo website, use any of the following payment options and check the Purchase event being registered: - Klarna - Card Payment - Direct Bank transfer - Cash on delivery - Paypal Reviewed By: tzahgr Differential Revision: D73507420 Pulled By: vahidkay-meta fbshipit-source-id: e879f24103ca0b4505fa981b99d820de9181ee77
Summary: ## Description Remove type casting for gpc to int ### Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [] I have commented my code, particularly in hard-to-understand areas. - [] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Remove type casting for gpc to int Pull Request resolved: #3078 Reviewed By: vinkmeta Differential Revision: D73508817 Privacy Context Container: L1313315 Pulled By: devbodaghe fbshipit-source-id: 27d7842646a79f2560424df784a8a889792ada7c
Summary: ## Description Disable unmapped fields to batch api ### Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [] I have commented my code, particularly in hard-to-understand areas. - [] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). ## Changelog entry Disable unmapped fields to batch api Pull Request resolved: #3079 Reviewed By: vinkmeta Differential Revision: D73518066 Privacy Context Container: L1313315 Pulled By: devbodaghe fbshipit-source-id: b94721cf267fbb78449a90cecf6f90a15764019d
Summary: # Fix Product Variation Fields Not Saving Correctly ## Description This PR fixes an issue where product variation custom fields for Facebook for WooCommerce were not being properly saved and displayed. Specifically, the MPN (Manufacturer Part Number) and custom image URL values weren't being preserved when saving product variations. The issue was caused by two main problems: 1. The MPN field was being incorrectly formatted as a decimal number with `wc_format_decimal()` when rendered, which is inappropriate for an alphanumeric identifier 2. The custom image URL was potentially being overwritten due to variable reuse in the save logic These bugs prevented merchants from properly configuring their product variations for Facebook Catalog sync. ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki](https://fburl.com/wiki/2cgfduwc). - [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki](https://fburl.com/wiki/nhx73tgs). ## Changelog entry Fix issue where product variation MPN and custom image URL fields weren't being properly saved and displayed. Pull Request resolved: #3090 Test Plan: 1. Create a variable product with at least one variation 2. Enable Facebook sync for the variation 3. Set a custom MPN value (e.g., "ABC12345") and a custom image URL 4. Save the product 5. Reload the product edit page 6. Verify that the MPN and custom image URL values have been preserved ## Screenshots ### Before https://pxl.cl/74Rzv When saving product variations, the MPN field and custom image URL would not persist after saving. ### After https://pxl.cl/74Rzk The MPN field and custom image URL now correctly display and save the values entered by users. Reviewed By: carterbuce Differential Revision: D73611087 Privacy Context Container: L1313315 Pulled By: devbodaghe fbshipit-source-id: 5308dfb808e63055d033b3da847fde32d0b62885
Summary: Removed failing test due to merge conflicts related to SAOff changes which are not pushed yet - Bug fix (non-breaking change which fixes an issue) - [x] I have commented my code, particularly in hard-to-understand areas. - [x] I have confirmed that my changes do not introduce any new PHPCS warnings or errors. - [x] I have checked plugin debug logs that my changes do not introduce any new PHP warnings or FATAL errors. - [x] I followed general Pull Request best practices. Meta employees to follow this [wiki]([url](https://fburl.com/wiki/2cgfduwc)). - [x] I have added tests (if necessary) and all the new and existing unit tests pass locally with my changes. - [x] I have completed dogfooding and QA testing, or I have conducted thorough due diligence to ensure that it does not break existing functionality. - [x] I have updated or requested update to plugin documentations (if necessary). Meta employees to follow this [wiki]([url](https://fburl.com/wiki/nhx73tgs)). Removed failing test due to merge conflicts Pull Request resolved: #3103 Test Plan: npm run test:php Reviewed By: SayanPandey Differential Revision: D73779212 Pulled By: vinkmeta fbshipit-source-id: b81923bf833834ceb11cf84298dd925b13a2f11b
vinkmeta
approved these changes
Apr 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.