Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BNPL Messaging - Open it up to all countries : PFW-699 #1501

Merged
merged 2 commits into from
Oct 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@ public function __construct() {
$this->enabled_credit_messaging_value = 'no';
}
$this->enabled_credit_messaging = 'yes' === $this->enabled_credit_messaging_value;
if ($this->enabled_credit_messaging) {
if ($this->is_us === false) {
$this->enabled_credit_messaging = false;
}
}
if ($this->enabled_credit_messaging) {
$this->credit_messaging_home_shortcode_value = isset($this->setting['credit_messaging_home_shortcode']) ? $this->setting['credit_messaging_home_shortcode'] : 'no';
$this->credit_messaging_home_shortcode = 'yes' === $this->credit_messaging_home_shortcode_value;
Expand Down
26 changes: 12 additions & 14 deletions classes/wc-gateway-paypal-express-angelleye-v1.php
Original file line number Diff line number Diff line change
Expand Up @@ -1871,20 +1871,18 @@ public function init_form_fields() {
'options' => $this->disallowed_funding_methods_array,
);
}
if ($this->is_us) {
$this->form_fields['credit_messaging'] = array(
'title' => __('PayPal Credit messaging - Buy Now Pay Later', 'paypal-for-woocommerce'),
'type' => 'title',
'description' => __('To add PayPal Credit messaging - Buy Now Pay Later to your site.', 'paypal-for-woocommerce'),
);
$this->form_fields['enabled_credit_messaging'] = array(
'title' => __('Enable/Disable', 'paypal-for-woocommerce'),
'label' => __('Enable PayPal Credit messaging - Buy Now Pay Later', 'paypal-for-woocommerce'),
'type' => 'checkbox',
'description' => $credit_messaging_text,
'default' => 'no'
);
}
$this->form_fields['credit_messaging'] = array(
'title' => __('PayPal Credit messaging - Buy Now Pay Later', 'paypal-for-woocommerce'),
'type' => 'title',
'description' => __('To add PayPal Credit messaging - Buy Now Pay Later to your site.', 'paypal-for-woocommerce'),
);
$this->form_fields['enabled_credit_messaging'] = array(
'title' => __('Enable/Disable', 'paypal-for-woocommerce'),
'label' => __('Enable PayPal Credit messaging - Buy Now Pay Later', 'paypal-for-woocommerce'),
'type' => 'checkbox',
'description' => $credit_messaging_text,
'default' => 'no'
);
}

public function is_available() {
Expand Down
Loading