Display WCPay task when installed via subscriptions option on profiler (https://github.com/woocommerce/woocommerce-admin/pull/8445)
This commit is contained in:
parent
4ec162bab0
commit
8465c10917
|
@ -2,6 +2,18 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Display WCPay task when installed via subscriptions option on profiler
|
||||
|
||||
1. Start with a fresh install.
|
||||
2. Navigate to WooCommerce -> Home to start the OBW.
|
||||
3. Ensure you select "subscriptions" under the step for product types.
|
||||
4. Complete the rest of the onboarding wizard.
|
||||
5. Confirm that "Get paid with WooCommerce Payments" appears under primary task list.
|
||||
6. When clicked, it should redirect to WCPay connection page.
|
||||
7. Set up/connect WooCommerce Payments.
|
||||
8. After WCPay is connected, go to the Homescreen and confirm that "Set up additional payment providers" appears under extended task list.
|
||||
9. When clicked, it should direct to the payments task.
|
||||
|
||||
## 3.3.0
|
||||
|
||||
### Prompt a modal to save any unsaved changes in OBW
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: Update
|
||||
|
||||
Display WCPay task when installed via subscriptions option on profiler
|
|
@ -107,8 +107,11 @@ class WooCommercePayments extends Task {
|
|||
*/
|
||||
public static function is_requested() {
|
||||
$profiler_data = get_option( Onboarding::PROFILE_DATA_OPTION, array() );
|
||||
$product_types = isset( $profiler_data['product_types'] ) ? $profiler_data['product_types'] : array();
|
||||
$business_extensions = isset( $profiler_data['business_extensions'] ) ? $profiler_data['business_extensions'] : array();
|
||||
return in_array( 'woocommerce-payments', $business_extensions, true );
|
||||
|
||||
$subscriptions_and_us = in_array( 'subscriptions', $product_types, true ) && 'US' === WC()->countries->get_base_country();
|
||||
return in_array( 'woocommerce-payments', $business_extensions, true ) || $subscriptions_and_us;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue