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,
|
getActivePlugins,
|
||||||
getOptions,
|
getOptions,
|
||||||
getUpdateOptionsError,
|
getUpdateOptionsError,
|
||||||
|
isJetpackConnected,
|
||||||
isUpdateOptionsRequesting,
|
isUpdateOptionsRequesting,
|
||||||
} = select( 'wc-api' );
|
} = select( 'wc-api' );
|
||||||
|
|
||||||
|
@ -378,6 +379,7 @@ export default compose(
|
||||||
const methods = getPaymentMethods( {
|
const methods = getPaymentMethods( {
|
||||||
activePlugins,
|
activePlugins,
|
||||||
countryCode,
|
countryCode,
|
||||||
|
isJetpackConnected: isJetpackConnected(),
|
||||||
options,
|
options,
|
||||||
profileItems,
|
profileItems,
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -33,6 +33,7 @@ import PayFast from './payfast';
|
||||||
export function getPaymentMethods( {
|
export function getPaymentMethods( {
|
||||||
activePlugins,
|
activePlugins,
|
||||||
countryCode,
|
countryCode,
|
||||||
|
isJetpackConnected,
|
||||||
options,
|
options,
|
||||||
profileItems,
|
profileItems,
|
||||||
} ) {
|
} ) {
|
||||||
|
@ -118,7 +119,10 @@ export function getPaymentMethods( {
|
||||||
</Fragment>
|
</Fragment>
|
||||||
),
|
),
|
||||||
before: <WCPayIcon />,
|
before: <WCPayIcon />,
|
||||||
visible: [ 'US' ].includes( countryCode ) && ! hasCbdIndustry,
|
visible:
|
||||||
|
[ 'US' ].includes( countryCode ) &&
|
||||||
|
! hasCbdIndustry &&
|
||||||
|
isJetpackConnected,
|
||||||
plugins: [ 'woocommerce-payments' ],
|
plugins: [ 'woocommerce-payments' ],
|
||||||
container: <WCPay />,
|
container: <WCPay />,
|
||||||
isConfigured: wcPayIsConfigured,
|
isConfigured: wcPayIsConfigured,
|
||||||
|
|
Loading…
Reference in New Issue