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:
parent
e9aad24125
commit
365e479614
|
@ -11,7 +11,8 @@
|
||||||
},
|
},
|
||||||
"mappings": {
|
"mappings": {
|
||||||
"wp-cli.yml": "./tests/wp-cli.yml",
|
"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": {
|
"lifecycleScripts": {
|
||||||
"afterStart": "./tests/e2e-pw/bin/test-env-setup.sh",
|
"afterStart": "./tests/e2e-pw/bin/test-env-setup.sh",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: add
|
||||||
|
|
||||||
|
Create a plugin to enable Variations feature #40027
|
|
@ -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' );
|
|
@ -12,6 +12,9 @@ wp-env run tests-cli wp rewrite structure '/%postname%/' --hard
|
||||||
echo -e 'Activate Filter Setter utility plugin \n'
|
echo -e 'Activate Filter Setter utility plugin \n'
|
||||||
wp-env run tests-cli wp plugin activate filter-setter
|
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'
|
echo -e 'Add Customer user \n'
|
||||||
wp-env run tests-cli wp user create customer customer@woocommercecoree2etestsuite.com \
|
wp-env run tests-cli wp user create customer customer@woocommercecoree2etestsuite.com \
|
||||||
--user_pass=password \
|
--user_pass=password \
|
||||||
|
|
|
@ -29,3 +29,6 @@ wp plugin activate filter-setter
|
||||||
|
|
||||||
# initialize pretty permalinks
|
# initialize pretty permalinks
|
||||||
wp rewrite structure /%postname%/
|
wp rewrite structure /%postname%/
|
||||||
|
|
||||||
|
# Activate our Enable Experimental Features utility.
|
||||||
|
wp plugin activate enable-experimental-features
|
||||||
|
|
Loading…
Reference in New Issue