Skip to content

[Enhancement] Support WooCommerce Product-Based Title & Excerpt Generation #871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 45 commits into from
Jun 9, 2025

Conversation

faisal-alvi
Copy link
Member

@faisal-alvi faisal-alvi commented Mar 13, 2025

Description of the Change

This PR enhances the title and excerpt generation feature to support WooCommerce products. It fetches key product details such as name, type, SKU, categories, attributes, price, stock status, and descriptions to generate optimized and high-converting titles and excerpts tailored for e-commerce. The implementation ensures compatibility with existing functionality while adding WooCommerce-specific logic for improved accuracy and relevance.

Closes #98 (Yet to determine if Woo Content & Tagging Generations will be included in this PR or handled separately).

How to test the Change

  1. Install and activate the WooCommerce plugin if not already enabled.
  2. Navigate to Products → Add New or edit an existing product.
  3. Verify Title & Excerpt Generation.
  4. Check Behavior for Non-Product Posts.

Changelog Entry

Added - Support for WooCommerce product-based title and excerpt generation
Changed - Bump WordPress minimum from 6.6 to 6.7

Credits

Props @jeffpaul @dkotter @faisal-alvi

Checklist:

@faisal-alvi faisal-alvi added this to the 3.4.0 milestone Mar 13, 2025
@faisal-alvi faisal-alvi self-assigned this Mar 13, 2025
@faisal-alvi faisal-alvi marked this pull request as ready for review March 13, 2025 14:37
@faisal-alvi faisal-alvi removed request for a team and jeffpaul March 13, 2025 14:37
Copy link
Collaborator

@dkotter dkotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good. Made a few minor changes and fixed a bug but there's still one major thing that needs fixed.

Generating titles and inserting those work and generating an excerpt works but inserting it does not. I think our JS that handles this needs updated to account for the TinyMCE editor Woo uses, whereas the normal excerpt input is just a textarea. Would also be nice to update the button text to make it clear it's generating a short product description and not an excerpt.

Also, if we could get some E2E tests here that would be great. Don't know if we need tests for each individual Provider but at least need one test to ensure titles can be generated and inserted on a product and that excerpts can be generated and inserted on a product (will need to install Woo to test that)

@faisal-alvi faisal-alvi requested a review from dkotter April 24, 2025 14:42
@faisal-alvi
Copy link
Member Author

faisal-alvi commented Apr 24, 2025

@dkotter The newly added tests are passing, but a few of the old ones have started failing. I’m skipping resolving them here for now as they seem unrelated.

@dkotter
Copy link
Collaborator

dkotter commented May 16, 2025

@dkotter The newly added tests are passing, but a few of the old ones have started failing. I’m skipping resolving them here for now as they seem unrelated.

Tests are currently passing on develop which implies the test failures are due to changes in this PR. I can also reproduce those failures locally. It does seem like an issue with having WooCommerce active. If I disable that, the tests start to pass. I think addressing my comment here: #871 (comment) will fix those tests

@dkotter dkotter merged commit 546fc0c into develop Jun 9, 2025
19 checks passed
@dkotter dkotter deleted the add/woo-specific-generations branch June 9, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WooCommerce Product-Based Title, Excerpt, Content & Tagging Generations
2 participants