Skip to content

feat(product-sync): Add separate short_description field to Facebook product data#3029

Closed
devbodaghe wants to merge 8 commits intofacebook:mainfrom
devbodaghe:feature/sync_short_description_1
Closed

feat(product-sync): Add separate short_description field to Facebook product data#3029
devbodaghe wants to merge 8 commits intofacebook:mainfrom
devbodaghe:feature/sync_short_description_1

Conversation

@devbodaghe
Copy link
Copy Markdown
Contributor

@devbodaghe devbodaghe commented Apr 8, 2025

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.

@devbodaghe devbodaghe force-pushed the feature/sync_short_description_1 branch from 990a1c0 to 8ee7987 Compare April 8, 2025 21:12
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@devbodaghe devbodaghe force-pushed the feature/sync_short_description_1 branch from 2f2c25d to 2e7f1d2 Compare April 9, 2025 12:18
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@devbodaghe merged this pull request in ac45802.

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
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
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)
@carterbuce carterbuce mentioned this pull request Apr 24, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants