mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Add onboarding header
This commit is contained in:
parent
ff8c6fdf01
commit
c0e8beb0ac
7 changed files with 62 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -5,7 +5,8 @@ node_modules
|
|||
.phpunit.result.cache
|
||||
yarn-error.log
|
||||
modules/ppcp-button/assets/*
|
||||
modules/ppcp-wc-gateway/assets/*
|
||||
modules/ppcp-wc-gateway/assets/js
|
||||
modules/ppcp-wc-gateway/assets/css
|
||||
*.zip
|
||||
.env
|
||||
auth.json
|
||||
|
|
|
@ -102,3 +102,28 @@ ul.ppcp-onboarding-options-sublist {
|
|||
.ppcp-muted-text {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.ppcp-onboarding-header {
|
||||
display: flex;
|
||||
width: 1000px;
|
||||
}
|
||||
|
||||
.ppcp-onboarding-header-left, .ppcp-onboarding-header-right {
|
||||
flex: 50%;
|
||||
}
|
||||
|
||||
.ppcp-onboarding-header h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.ppcp-onboarding-header-cards img, .ppcp-onboarding-header-paypal-logos img {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.ppcp-onboarding-header-cards img {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.ppcp-onboarding-header-paypal-logos img {
|
||||
height: 45px;
|
||||
}
|
||||
|
|
BIN
modules/ppcp-wc-gateway/assets/images/paylater-button.png
Normal file
BIN
modules/ppcp-wc-gateway/assets/images/paylater-button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
modules/ppcp-wc-gateway/assets/images/paypal-button.png
Normal file
BIN
modules/ppcp-wc-gateway/assets/images/paypal-button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
modules/ppcp-wc-gateway/assets/images/paypal.png
Normal file
BIN
modules/ppcp-wc-gateway/assets/images/paypal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
BIN
modules/ppcp-wc-gateway/assets/images/venmo-button.png
Normal file
BIN
modules/ppcp-wc-gateway/assets/images/venmo-button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -266,7 +266,41 @@ return array(
|
|||
$onboarding_options_renderer = $container->get( 'onboarding.render-options' );
|
||||
assert( $onboarding_options_renderer instanceof OnboardingOptionsRenderer );
|
||||
|
||||
$module_url = $container->get( 'wcgateway.url' );
|
||||
|
||||
$fields = array(
|
||||
'ppcp_onboarading_header' => array(
|
||||
'type' => 'ppcp-text',
|
||||
'text' => '
|
||||
<div class="ppcp-onboarding-header">
|
||||
<div class="ppcp-onboarding-header-left">
|
||||
<img alt="paypal" src="' . esc_url( $module_url ) . 'assets/images/paypal.png"/>
|
||||
<h2>The all-in-one checkout solution</h2>
|
||||
</div>
|
||||
<div class="ppcp-onboarding-header-right">
|
||||
<div class="ppcp-onboarding-header-paypal-logos">
|
||||
<img alt="venmo" src="' . esc_url( $module_url ) . 'assets/images/paypal-button.png"/>
|
||||
<img alt="venmo" src="' . esc_url( $module_url ) . 'assets/images/venmo-button.png"/>
|
||||
<img alt="venmo" src="' . esc_url( $module_url ) . 'assets/images/paylater-button.png"/>
|
||||
</div>
|
||||
<div class="ppcp-onboarding-header-cards">
|
||||
<img alt="visa" src="' . esc_url( $module_url ) . 'assets/images/visa.svg"/>
|
||||
<img alt="mastercard" src="' . esc_url( $module_url ) . 'assets/images/mastercard.svg"/>
|
||||
<img alt="amex" src="' . esc_url( $module_url ) . 'assets/images/amex.svg"/>
|
||||
<img alt="discover" src="' . esc_url( $module_url ) . 'assets/images/discover.svg"/>
|
||||
<img alt="ideal" src="' . esc_url( $module_url ) . 'assets/images/ideal.svg"/>
|
||||
<img alt="sofort" src="' . esc_url( $module_url ) . 'assets/images/sofort.svg"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>',
|
||||
'screens' => array(
|
||||
State::STATE_START,
|
||||
State::STATE_PROGRESSIVE,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => 'paypal',
|
||||
),
|
||||
|
||||
'credentials_production_heading' => array(
|
||||
'heading' => __( 'API Credentials', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'ppcp-heading',
|
||||
|
@ -1968,6 +2002,7 @@ return array(
|
|||
}
|
||||
|
||||
if ( State::STATE_ONBOARDED === $state->production_state() || State::STATE_ONBOARDED === $state->sandbox_state() ) {
|
||||
unset( $fields['ppcp_onboarading_header'] );
|
||||
unset( $fields['ppcp_onboarading_options'] );
|
||||
unset( $fields['ppcp_onboarding_sandbox_ppcp'] );
|
||||
unset( $fields['ppcp_onboarding_sandbox_express'] );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue