Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Add changelog and enable promotion in core and plugin configs #7666

Merged
merged 9 commits into from Sep 27, 2021
4 changes: 4 additions & 0 deletions changelogs/update-7319_enable_wc_pay_experiment
@@ -0,0 +1,4 @@
Significance: minor
Type: Enhancement

Adds experiment for promoting wcpay in payment methods table. #7666
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we spell out WooCommerce Payments in this changelog entry?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also very nitpicky and something we aren't consistent on is verb tense in changelogs.

2 changes: 1 addition & 1 deletion config/core.json
Expand Up @@ -18,6 +18,6 @@
"store-alerts": true,
"tasks": false,
"transient-notices": true,
"wc-pay-promotion": false
"wc-pay-promotion": true
}
}
2 changes: 1 addition & 1 deletion config/plugin.json
Expand Up @@ -18,6 +18,6 @@
"store-alerts": true,
"tasks": false,
"transient-notices": true,
"wc-pay-promotion": false
"wc-pay-promotion": true
}
}
3 changes: 2 additions & 1 deletion src/Features/WcPayPromotion/Init.php
Expand Up @@ -16,6 +16,7 @@
*/
class Init {
const SPECS_TRANSIENT_NAME = 'woocommerce_admin_payment_method_promotion_specs';
const EXPLAT_VARIATION_PREFIX = 'woocommerce_wc_pay_promotion_payment_methods_table_';

/**
* Constructor.
Expand Down Expand Up @@ -113,7 +114,7 @@ public static function should_register_pre_install_wc_pay_promoted_gateway() {
$allow_tracking
);

$variation_name = $abtest->get_variation( 'woocommerce_wc_pay_promotion_payment_methods_table_' . $wc_pay_spec->additional_info->experiment_version );
$variation_name = $abtest->get_variation( self::EXPLAT_VARIATION_PREFIX . $wc_pay_spec->additional_info->experiment_version );

if ( 'treatment' === $variation_name ) {
return true;
Expand Down