Skip to content

Commit

Permalink
Merge pull request #105 from woocommerce/PCP-78-uk-buy-now-pay-later
Browse files Browse the repository at this point in the history
UK buy now pay later
  • Loading branch information
Dinamiko authored Jan 22, 2021
2 parents 2bd8dc0 + 1d17335 commit 78db8e6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/ppcp-button/src/Helper/class-messagesapply.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class MessagesApply {
*/
private $countries = array(
'US',
'GB',
);

/**
Expand Down
42 changes: 42 additions & 0 deletions modules/ppcp-wc-gateway/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,48 @@ static function ( $container ): AuthorizeOrderActionNotice {
unset( $fields['disable_funding']['options']['card'] );
}

/**
* Enable Pay in 3 for UK.
*/
if ( 'GB' === $country ) {
$fields['message_heading'] = array(
'heading' => __( 'Pay Later Messaging on Checkout', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_PROGRESSIVE,
State::STATE_ONBOARDED,
),
'requirements' => array( 'messages' ),
'gateway' => 'paypal',
'description' => __( 'Display pay later messaging on your site for offers like Pay in 3, which lets customers pay with 3 interest-free monthly payments. We’ll show messages on your site to promote this feature for you. You may not promote pay later offers with any other content, marketing, or materials.', 'woocommerce-paypal-payments' ),
'class' => array( 'ppcp-subheading' ),
);
$fields['message_product_heading'] = array(
'heading' => __( 'Pay Later Messaging on Single Product Page', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_PROGRESSIVE,
State::STATE_ONBOARDED,
),
'requirements' => array( 'messages' ),
'gateway' => 'paypal',
'description' => __( 'Display pay later messaging on your site for offers like Pay in 3, which lets customers pay with 3 interest-free monthly payments. We’ll show messages on your site to promote this feature for you. You may not promote pay later offers with any other content, marketing, or materials.', 'woocommerce-paypal-payments' ),
'class' => array( 'ppcp-subheading' ),
);
$fields['message_cart_heading'] = array(
'heading' => __( 'Pay Later Messaging on Cart', 'woocommerce-paypal-payments' ),
'type' => 'ppcp-heading',
'screens' => array(
State::STATE_PROGRESSIVE,
State::STATE_ONBOARDED,
),
'requirements' => array( 'messages' ),
'gateway' => 'paypal',
'description' => __( 'Display pay later messaging on your site for offers like Pay in 3, which lets customers pay with 3 interest-free monthly payments. We’ll show messages on your site to promote this feature for you. You may not promote pay later offers with any other content, marketing, or materials.', 'woocommerce-paypal-payments' ),
'class' => array( 'ppcp-subheading' ),
);
}

$dcc_applies = $container->get( 'api.helpers.dccapplies' );
/**
* Depending on your store location, some credit cards can't be used.
Expand Down

0 comments on commit 78db8e6

Please sign in to comment.