Automattic / Automattic/jetpack

[Jetpack AI] Make it aware of a custom post type

Open
#28,589 2 comments 0 reactions 0 assignees View on GitHub
[Block] AI Paragraph
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

We would LOVE for the AI Paragraph block to be useful for writing the product descriptions in WooCommerce.

1. Product edit page is still not Gutenberg, but I have seen some filters around the internet to enable that. The first task would be to try to enable Gutenberg in the product page, just for the demo purposes
2. Detect the CPT from within the block. This can be done with `wp.data.select( 'core/editor' ).getCurrentPostType();`
3. If that CPT is 'product' then change the prompt for something like - feel to experiment with different prompts. We may also want to just combine this work with #28569 and pass the CPT there as well.

`This is a description of a product named "$title": `

Contributor guide

Open the contributing guide

Research direction

Start by locating the AI Paragraph block and reading how it obtains editor context; the issue specifically points to wp.data.select('core/editor').getCurrentPostType(). Check how WooCommerce product editing and Gutenberg support relate to the block. Done means the block works on the product custom post type and uses product-description context without regressing regular posts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, react, wordpress
Domain
content, frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.