* Adapt the Add to Cart Button block to be registered via block.json
* Remove the legacy supports.ts file
* Ditch all registration methods from the ProductButton class as it is now registered via metadata (a block.json file)
* Update get_block_type_uses_context and register_block_type_assets
* Only validate postcode if its required
* Clear postcode validation error if postcode is not required
---------
Co-authored-by: Niels Lange <info@nielslange.de>
Implements the ProductSelector advanced filter within the “Products (Beta)” block.
The filter allows the merchant to narrow down the exact products to which all
subsequent filters will be applied, mirroring the functionality of the existing
“Hand-picked Products” plus all the other functionalities available
from the “Products (Beta)” block.
* Empty commit for release pull request
* Add 10.0.3 changelog
* Update versions to 10.0.3
* Fix image editor in Featured Product/Category blocks on WP 6.2 (https://github.com/woocommerce/woocommerce-blocks/pull/9142)
* Add 10.0.3 testing steps
* Empty commit for release pull request
* Check that the customized fallback template is archive-product before unsetting the source property (https://github.com/woocommerce/woocommerce-blocks/pull/9330)
* use 'enqueue_block_assets' is available (https://github.com/woocommerce/woocommerce-blocks/pull/9332)
* Remove esc_url() on self generated link to edit the Mini Cart template since it gets escaped in JS (https://github.com/woocommerce/woocommerce-blocks/pull/9348)
* Add changelog entries to readme.txt
* Update version number in several files
* Add testing notes for the release
* Add woocommerce/woocommerce-blocks#9332 to testing notes
* Add testing on frontend for woocommerce/woocommerce-blocks#9332
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
Co-authored-by: Luigi Teschio <gigitux@gmail.com>
Co-authored-by: Alexandre Lara <allexandrelara@gmail.com>
The plugin's readme.txt file had a URL to the official documentation but
there was no hyperlink - only text.
This improves the page by removing the text link and hyperlinking the
"official documentation" text itself.
* Add pattern for split hero product banner.
This adds a new pattern for a hero product banner with a 50/50 split,
heading and CTA on left and product image on right.
Uses the Media + Text block.
* Update image to use Unsplash placeholder.
* Remove WooCommerce prefix in pattern title.
* Remove unneeded wrapper group block.
* Serve placeholder image from plugin directory.
* Preserve email when rendering shipping address form for the first time
* Ensure billing email does not reset when changing form values
* Add test to ensure email does not get overwritten
* Ensure the product title is correct when used outside of the scope of the single product template.
* Update docblock with the details about the temporary workaround.
* Move notice to top and only show on cart page
* Missing setting on cart page prevents notice display
* Allow null in the select-shipping-rate endpoint to select all packages
* Only show the warning if different packages are selected
* Check if selected rates is an object before mapping it
---------
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* Remove min-height and padding for WP Button elements
* Remove commented out code
* Add min-height style back in for .woocommerce-block-theme-has-button-styles themes
* Fixed store api documentation for min_price and max_price
* Update products.md
* Update products.md
* Update src/StoreApi/docs/products.md
Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
---------
Co-authored-by: Karol Manijak <karol.manijak@automattic.com>
* Using nested selector to style Product elements in Products Block
This commit simplifies the INNER_BLOCKS_TEMPLATE array in the product-query constants.ts file by removing the style properties from the individual elements. Instead, the default styles are now managed in the style.scss file, providing a more consistent and centralized approach to styling.
In the style.scss file, a new section for default styling has been added to handle product elements inside the Products Block, adhering to the Gutenberg styling hierarchy. This ensures the lowest precedence in the hierarchy, allowing for easier overrides when needed.
* Decrease specificity of styles for product elements in Products Block
The commit changes the default styles for product elements inside the 'Products Block'. It changes the way the margin-bottom and margin-top properties are set by using the :where() selector instead of using the .products-block-post-template class selector. This is done to decrease the specificity of the CSS selector, ensuring that the styles have the lowest precedence in the hierarchy. It also removes the display: inline-block property from the a selector, and moves the styles to the .editor-styles-wrapper class selector.
* Decrease specificity of CSS selectors
In these changes, the product elements inside the Products Block have been restyled. The specificity of the CSS selector has been decreased using the :where() selector, to ensure that these styles have the lowest precedence in the hierarchy.
In constants.ts, a new class name, products-block-post-template, has been added to the inner block template for the post. This class is used to add default styles for inner blocks.
In style.scss, the CSS selector for the inner blocks has been updated to include the new class name. The :where() selector has also been used to ensure that these styles have the lowest precedence in the hierarchy.
* Update default margins and remove redundant entries
This commit updates the default margin values for the Product Title in the Products block, moving them from the style.scss file to the constants.ts file. It also removes unnecessary empty arrays in the INNER_BLOCKS_TEMPLATE and background-color property from the style.scss file.