Use PHP 7.4 for WooCommerce Blocks' `wp-env` Config (#51075)

This resolves a PHP 7.4 compatibility problem as well as updates the `wp-env` config for the Blocks tests to use 7.4 rather than the latest.
This commit is contained in:
Christopher Allford 2024-09-03 09:54:22 -07:00 committed by GitHub
parent c656fdc59b
commit caf9ec635e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 8 deletions

View File

@ -1,5 +1,6 @@
{
"core": null,
"phpVersion": "7.4",
"plugins": [
"https://github.com/WP-API/Basic-Auth/archive/master.zip",
"https://downloads.wordpress.org/plugin/wordpress-importer.0.8.zip",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Comment: Just a change to the dev environment config.

View File

@ -304,8 +304,9 @@ class ProductCollection extends AbstractBlock {
$p->set_attribute(
'data-wc-context',
wp_json_encode(
array_merge(
$current_context,
array(
...$current_context,
// The message to be announced by the screen reader when the page is loading or loaded.
'accessibilityLoadingMessage' => __( 'Loading page, please wait.', 'woocommerce' ),
'accessibilityLoadedMessage' => __( 'Page Loaded.', 'woocommerce' ),
@ -313,6 +314,7 @@ class ProductCollection extends AbstractBlock {
// This way we avoid prefetching when the page loads.
'isPrefetchNextOrPreviousLink' => false,
),
),
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
)
);