9b99154d72
* Fine-tune the prompts for generating product titles. * Update the prompt for images. * Update the prompts for generating content for patterns. * Break down the pattern content generation into individual methods. * Add character limit to prompts. * Add character limit for a handful of titles. * Add character limit to the title of the product-collection-4-columns pattern. * Update the prompt to not add abbreviations * Introduce the refine_returned_images_results method for AI to filter the images returned by Pexels * Implement retry if the number of images returned by Pexels API is smaller than the number of images required by products and patterns. * Update the prompt for the images search term. * Fix AI image assignment for newly created products and improve performance. * Ensure no additional dummy products are created or updated in simultaneous requests. * Fix error on generating content for patterns for the first time and saving it to the post. * Return error if the connection with AI failed. * Update the prompt character limit for the Featured Category Triple pattern. * Implement retry if the API connection with AI fails. Update the prompt to remove the length instruction. Add the last_business_description check to prevent duplicated API calls. Set a transient for images in case the request fails. * Add retry for returning the refined search results. Update the prompt for defining the search term. Update error validation. * Update the structure for fetching patterns content and reduce the number of requests. * Break down the pattern ai content generation and assignment into multiple methods and introduce retry in case of failure. * Update the structure for applying the AI generated content to patterns. Update the fetch and validation of ai responses and update the prompt to ensure longer texts are returned. * Update the validation of the content returned by AI by verifying the array keys and ensuring the values are not empty. Additionally, the completion should be set. * If for some reason AI didn't return the complete list of expected generated content, use the same the previous text from the same pattern as a replacement and avoid making an extra request to fetch just fetch a possible missing result. * Update prompts for patterns. * Make a single request to fetch all products data, implement retry for products and validation for the response returned by AI. * Update the retries variable first within the patterns loop. * Narrow down the AI content generation to only patterns that are part of the Assembler. * Update the size of images and the prompt for AI generated content assigned to products. * Don't make request to AI if the user provided a single word for their business description. * Update the image assignment to products and remove the unused update_dummy_products method. * Update the prompt for generating content for patterns. * Update the prompt for products content generation and ensure that an error is returned if all requests fail. * Update the prompt for patterns. * Update the prompt for images. * Update the prompt for images. * Update prompt for button text. * Don't schedule action for updating patterns content if the business description wasn't updated. * add associative option when the local json is parsed * Ensure the expected list of results matches the number or products to be updated. * fix lint error * Address CR. --------- Co-authored-by: Luigi Teschio <gigitux@gmail.com> |
||
---|---|---|
.. | ||
.github | ||
.husky | ||
.sources | ||
.vscode | ||
.wordpress-org | ||
assets | ||
bin | ||
docs | ||
images | ||
packages | ||
patches | ||
patterns | ||
src | ||
storybook | ||
templates | ||
tests | ||
.distignore | ||
.editorconfig | ||
.env | ||
.eslintignore | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
.markdownlint.json | ||
.markdownlintignore | ||
.nvmrc | ||
.prettierignore | ||
.prettierrc.js | ||
.stylelintrc.json | ||
.wp-env.json | ||
LICENSE | ||
README.md | ||
babel.config.js | ||
checkstyle.xml | ||
composer.json | ||
composer.lock | ||
docker-compose.yml | ||
global.d.ts | ||
package-lock.json | ||
package.json | ||
phpcs.xml | ||
phpunit.xml.dist | ||
postcss.config.js | ||
readme.txt | ||
tsconfig.base.json | ||
tsconfig.json | ||
webpack.config.js | ||
woocommerce-gutenberg-products-block.php | ||
wp-cli.yml |
README.md
WooCommerce Blocks
This is the feature plugin for WooCommerce + the Gutenberg. This plugin serves as a space to iterate and explore new Blocks and updates to existing blocks for WooCommerce, and how WooCommerce might work with the block editor.
Use this plugin if you want access to the bleeding edge of available blocks for WooCommerce. However, stable blocks are bundled into WooCommerce, and can be added from the "WooCommerce" section in the block inserter.
Table of Contents
- Documentation
- Installing the plugin version
- Installing the development version
- Getting started with block development
- Long-term vision
Documentation
To find out more about the blocks and how to use them, check out the documentation on WooCommerce.com.
If you want to see what we're working on for future versions, or want to help out, read on.
Code Documentation
- Blocks - Documentation for specific Blocks.
- Editor Components - Shared components used in WooCommerce blocks for the editor (Gutenberg) UI.
- WooCommerce Blocks Handbook - Documentation for designers and developers on how to extend or contribute to blocks, and how internal developers should handle new releases.
- WooCommerce Blocks Storybook - Contains a list and demo of components used in the plugin.
Installing the plugin version
We release a new version of WooCommerce Blocks onto WordPress.org every few weeks, which can be used as an easier way to preview the features.
Note: The plugin follows a policy of supporting the "L0" strategy for version support. What this means is that the plugin will require the most recent version of WordPress. It will also require the most recent version of WooCommerce core at the time of a release. You can read more about this policy here.
1.Ensure you have the latest available versions of WordPress and WooCommerce installed on your site. 2. The plugin version is available on WordPress.org. Download the plugin version here. 3. Activate the plugin.
Installing the development version
- Ensure you have the latest versions of WordPress and WooCommerce installed on your site.
- Get a copy of this plugin using the green "Clone or download" button on the right.
- Make sure you're using Node.js v16.15. If you use a Node version management tool such as
nvm
orn
, you can do so by runningnvm use
orn auto
, respectively. npm install
to install the dependencies.composer install
to install core dependencies.- To compile the code, run any of the following commands
npm run build
(production build).npm run dev
(development build).npm start
(development build + watching for changes).
- Activate the plugin.
The source code is in the assets/
folder, and the compiled code is stored into build/
.
Getting started with block development
Run through the "Writing Your First Block Type" tutorial for a quick course in block-building.
For deeper dive, try looking at the core blocks code, or see what components are available.
To begin contributing to the WooCommerce Blocks plugin, see our getting started guide and developer handbook.
Other useful docs to explore:
Long-term vision
WooCommerce Blocks are the easiest, most flexible way to build your store's user interface and showcase your products.