feat(product-sync): Add separate short_description field to Facebook product data#3029
Closed
devbodaghe wants to merge 8 commits intofacebook:mainfrom
Closed
feat(product-sync): Add separate short_description field to Facebook product data#3029devbodaghe wants to merge 8 commits intofacebook:mainfrom
devbodaghe wants to merge 8 commits intofacebook:mainfrom
Conversation
990a1c0 to
8ee7987
Compare
Contributor
|
@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
added 7 commits
April 9, 2025 13:18
2f2c25d to
2e7f1d2
Compare
Contributor
|
@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
@devbodaghe merged this pull request in ac45802. |
Closed
6 tasks
vinkmeta
pushed a commit
that referenced
this pull request
Apr 13, 2025
…product data (#3029) Summary: # Add separate short_description field to Facebook product catalog ## Description 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. ### Changes Made - 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 ### Before 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. ### After 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 ### Testing - [ ] 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 ## Impact 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. # Added tests for product short descriptions in Facebook 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. ## Test Cases - **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
This was referenced Apr 14, 2025
Closed
mradmeta
pushed a commit
that referenced
this pull request
Apr 14, 2025
…product data (#3029) Summary: # Add separate short_description field to Facebook product catalog ## Description 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. ### Changes Made - 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 ### Before 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. ### After 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 ### Testing - [ ] 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 ## Impact 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. # Added tests for product short descriptions in Facebook 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. ## Test Cases - **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
rubycalling
pushed a commit
that referenced
this pull request
Apr 16, 2025
…product data (#3029) Summary: # Add separate short_description field to Facebook product catalog ## Description 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. ### Changes Made - 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 ### Before 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. ### After 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 ### Testing - [ ] 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 ## Impact 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. # Added tests for product short descriptions in Facebook 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. ## Test Cases - **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
This was referenced Apr 18, 2025
carterbuce
pushed a commit
to carterbuce/facebook-for-woocommerce
that referenced
this pull request
Apr 24, 2025
…product data (facebook#3029) Summary: # Add separate short_description field to Facebook product catalog ## Description 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. ### Changes Made - 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 ### Before 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. ### After 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 ### Testing - [ ] 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 ## Impact 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. # Added tests for product short descriptions in Facebook 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. ## Test Cases - **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: facebook#3029 Differential Revision: D72671275 Privacy Context Container: L1313315 Pulled By: devbodaghe fbshipit-source-id: 177fd103bf4768af2a88a67cb20e9bc7c42ac369 (cherry picked from commit ac45802)
carterbuce
pushed a commit
to carterbuce/facebook-for-woocommerce
that referenced
this pull request
Apr 24, 2025
…product data (facebook#3029) Summary: # Add separate short_description field to Facebook product catalog ## Description 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. ### Changes Made - 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 ### Before 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. ### After 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 ### Testing - [ ] 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 ## Impact 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. # Added tests for product short descriptions in Facebook 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. ## Test Cases - **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: facebook#3029 Differential Revision: D72671275 Privacy Context Container: L1313315 Pulled By: devbodaghe fbshipit-source-id: 177fd103bf4768af2a88a67cb20e9bc7c42ac369 (cherry picked from commit ac45802)
Closed
tzahgr
pushed a commit
that referenced
this pull request
Apr 24, 2025
…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
This was referenced May 2, 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.
Add separate short_description field to Facebook product catalog
Description
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.
Changes Made
short_descriptionfield to product data sent to Facebookget_fb_short_description()method to handle variation products consistently with main descriptionBefore
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.
After
Now both descriptions are sent to Facebook as separate fields:
description: Contains the main product descriptionshort_description: Contains the product's short descriptionTesting
Impact
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.
Added tests for product short descriptions in Facebook 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.Test Cases
facebook_for_woocommerce_fb_product_short_descriptionfilter hook works correctlyThese tests help ensure reliable product information display when syncing to Facebook catalog and maintain consistency with WooCommerce's product description behavior.