Added check to show WC Pay option only when Jetpack is connected (https://github.com/woocommerce/woocommerce-admin/pull/4105)
* Added check to show WC Pay option only when Jetpack is connected A verification was added to the Setup Checklist payment step, to show WC Pay option only when Jetpack is connected * Changed the solution approach Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
This commit is contained in:
parent
866487ee27
commit
1e1daaa6bb
|
@ -352,6 +352,7 @@ export default compose(
|
|||
getActivePlugins,
|
||||
getOptions,
|
||||
getUpdateOptionsError,
|
||||
isJetpackConnected,
|
||||
isUpdateOptionsRequesting,
|
||||
} = select( 'wc-api' );
|
||||
|
||||
|
@ -378,6 +379,7 @@ export default compose(
|
|||
const methods = getPaymentMethods( {
|
||||
activePlugins,
|
||||
countryCode,
|
||||
isJetpackConnected: isJetpackConnected(),
|
||||
options,
|
||||
profileItems,
|
||||
} );
|
||||
|
|
|
@ -33,6 +33,7 @@ import PayFast from './payfast';
|
|||
export function getPaymentMethods( {
|
||||
activePlugins,
|
||||
countryCode,
|
||||
isJetpackConnected,
|
||||
options,
|
||||
profileItems,
|
||||
} ) {
|
||||
|
@ -118,7 +119,10 @@ export function getPaymentMethods( {
|
|||
</Fragment>
|
||||
),
|
||||
before: <WCPayIcon />,
|
||||
visible: [ 'US' ].includes( countryCode ) && ! hasCbdIndustry,
|
||||
visible:
|
||||
[ 'US' ].includes( countryCode ) &&
|
||||
! hasCbdIndustry &&
|
||||
isJetpackConnected,
|
||||
plugins: [ 'woocommerce-payments' ],
|
||||
container: <WCPay />,
|
||||
isConfigured: wcPayIsConfigured,
|
||||
|
|
Loading…
Reference in New Issue