Create a plugin to enable Variations feature (#40027)

* Add plugin to enable features and map it

* Activate plugin

* Add changelog
This commit is contained in:
Fernando Marichal 2023-09-06 12:48:57 -03:00 committed by GitHub
parent e9aad24125
commit 365e479614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 1 deletions

View File

@ -11,7 +11,8 @@
},
"mappings": {
"wp-cli.yml": "./tests/wp-cli.yml",
"wp-content/plugins/filter-setter.php": "./tests/e2e-pw/bin/filter-setter.php"
"wp-content/plugins/filter-setter.php": "./tests/e2e-pw/bin/filter-setter.php",
"wp-content/plugins/enable-experimental-features.php": "./tests/e2e-pw/bin/enable-experimental-features.php"
},
"lifecycleScripts": {
"afterStart": "./tests/e2e-pw/bin/test-env-setup.sh",

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Create a plugin to enable Variations feature #40027

View File

@ -0,0 +1,13 @@
<?php
/**
* Plugin Name: Enable Experimental Features
* Description: Utility designed for E2E testing purposes. It activates experimental features in WooCommerce.
* @package Automattic\WooCommerce\E2EPlaywright
*/
function enable_experimental_features( $features ) {
$features['product-variation-management'] = true;
return $features;
}
add_filter( 'woocommerce_admin_get_feature_config', 'enable_experimental_features' );

View File

@ -12,6 +12,9 @@ wp-env run tests-cli wp rewrite structure '/%postname%/' --hard
echo -e 'Activate Filter Setter utility plugin \n'
wp-env run tests-cli wp plugin activate filter-setter
echo -e 'Activate Enable Experimental Features utility plugin \n'
wp-env run tests-cli wp plugin activate enable-experimental-features
echo -e 'Add Customer user \n'
wp-env run tests-cli wp user create customer customer@woocommercecoree2etestsuite.com \
--user_pass=password \

View File

@ -29,3 +29,6 @@ wp plugin activate filter-setter
# initialize pretty permalinks
wp rewrite structure /%postname%/
# Activate our Enable Experimental Features utility.
wp plugin activate enable-experimental-features