Skip to content

Feature: Short Description Fallback#3048

Closed
devbodaghe wants to merge 3 commits intofacebook:mainfrom
devbodaghe:feature/short-description-fallback
Closed

Feature: Short Description Fallback#3048
devbodaghe wants to merge 3 commits intofacebook:mainfrom
devbodaghe:feature/short-description-fallback

Conversation

@devbodaghe
Copy link
Copy Markdown
Contributor

Feature: Short Description Fallback

Summary

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.

@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 6c768e4.

mradmeta pushed a commit that referenced this pull request Apr 14, 2025
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
rubycalling pushed a commit that referenced this pull request Apr 16, 2025
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
carterbuce pushed a commit to carterbuce/facebook-for-woocommerce that referenced this pull request Apr 24, 2025
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: facebook#3048

Reviewed By: vinkmeta

Differential Revision: D72866715

Pulled By: devbodaghe

fbshipit-source-id: 87fe2e362dcc025b2633894f930afa9cbd9a174d

(cherry picked from commit 6c768e4)
carterbuce pushed a commit to carterbuce/facebook-for-woocommerce that referenced this pull request Apr 24, 2025
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: facebook#3048

Reviewed By: vinkmeta

Differential Revision: D72866715

Pulled By: devbodaghe

fbshipit-source-id: 87fe2e362dcc025b2633894f930afa9cbd9a174d
(cherry picked from commit 6c768e4)
@carterbuce carterbuce mentioned this pull request Apr 24, 2025
tzahgr pushed a commit that referenced this pull request Apr 24, 2025
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
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