Increase product excerpt default length in Single Product template and block (#47651)
* Increase the length of Product Summary block (core/post-excerpt variation) * Add changelog * Bring back the Product Summary variation to original length * Increase the Product Summary length to max 100 words in Single Product template and block * Increase the Product Summary length to max 100 words in Single Product block * Update tests * Change the attribute type froms tring to niumber as expected
This commit is contained in:
parent
5dd7713346
commit
fe30778293
|
@ -42,6 +42,7 @@ const getBlockifiedTemplate = () =>
|
|||
} ),
|
||||
createBlock( 'core/post-excerpt', {
|
||||
__woocommerceNamespace: PRODUCT_SUMMARY_VARIATION_NAME,
|
||||
excerptLength: 100,
|
||||
} ),
|
||||
createBlock( 'woocommerce/add-to-cart-form' ),
|
||||
createBlock( 'woocommerce/product-meta' ),
|
||||
|
|
|
@ -65,6 +65,7 @@ export const DEFAULT_INNER_BLOCKS: InnerBlockTemplate[] = [
|
|||
{
|
||||
__woocommerceNamespace:
|
||||
PRODUCT_SUMMARY_VARIATION_NAME,
|
||||
excerptLength: 100,
|
||||
},
|
||||
],
|
||||
[ 'woocommerce/add-to-cart-form' ],
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: update
|
||||
|
||||
Product Summary: Increase the length of the description from 55 to 100 words (max supported by core/post-excerpt)
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<!-- wp:woocommerce/product-price {"isDescendentOfSingleProductTemplate":true, "fontSize":"large"} /-->
|
||||
|
||||
<!-- wp:post-excerpt {"__woocommerceNamespace":"woocommerce/product-query/product-summary"} /-->
|
||||
<!-- wp:post-excerpt {"__woocommerceNamespace":"woocommerce/product-query/product-summary", "excerptLength":100} /-->
|
||||
|
||||
<!-- wp:woocommerce/add-to-cart-form /-->
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ class SingleProductTemplateTests extends WP_UnitTestCase {
|
|||
|
||||
<!-- wp:woocommerce/product-price {"isDescendentOfSingleProductTemplate":true, "fontSize":"large"} /-->
|
||||
|
||||
<!-- wp:post-excerpt {"__woocommerceNamespace":"woocommerce/product-query/product-summary"} /-->
|
||||
<!-- wp:post-excerpt {"__woocommerceNamespace":"woocommerce/product-query/product-summary", "excerptLength":100} /-->
|
||||
|
||||
<!-- wp:woocommerce/add-to-cart-form /-->
|
||||
|
||||
|
@ -204,7 +204,7 @@ class SingleProductTemplateTests extends WP_UnitTestCase {
|
|||
<!-- wp:column -->
|
||||
<div class="wp-block-column">
|
||||
<!-- wp:post-title {"level": 1, "__woocommerceNamespace":"woocommerce/product-query/product-title"} /-->
|
||||
<!-- wp:post-excerpt {"__woocommerceNamespace":"woocommerce/product-query/product-summary"} /-->
|
||||
<!-- wp:post-excerpt {"__woocommerceNamespace":"woocommerce/product-query/product-summary", "excerptLength":100} /-->
|
||||
</div>
|
||||
<!-- /wp:column -->
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue