' . sprintf(__('Braintree is enabled, but the force SSL option is disabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - Braintree custome credit card UI will only work in sandbox mode.', 'paypal-for-woocommerce'), admin_url('admin.php?page=wc-settings&tab=checkout')) . '
';
}
$this->add_dependencies_admin_notices();
diff --git a/classes/wc-gateway-paypal-advanced-angelleye.php b/classes/wc-gateway-paypal-advanced-angelleye.php
index 3644618c8..6a80a281c 100644
--- a/classes/wc-gateway-paypal-advanced-angelleye.php
+++ b/classes/wc-gateway-paypal-advanced-angelleye.php
@@ -69,7 +69,7 @@ public function __construct() {
$this->is_encrypt = $this->get_option('is_encrypt', 'no');
$this->transtype = $this->get_option('transtype');
$this->mobilemode = $this->get_option('mobilemode', 'yes');
- if ( is_ssl() || get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$this->icon = preg_replace("/^http:/i", "https:", $this->icon);
}
$this->icon = apply_filters('woocommerce_paypal_advanced_icon', $this->icon);
diff --git a/classes/wc-gateway-paypal-credit-cards-rest-angelleye.php b/classes/wc-gateway-paypal-credit-cards-rest-angelleye.php
index 2b88eb8ee..d50e6ae38 100644
--- a/classes/wc-gateway-paypal-credit-cards-rest-angelleye.php
+++ b/classes/wc-gateway-paypal-credit-cards-rest-angelleye.php
@@ -36,7 +36,7 @@ function __construct() {
$this->init_form_fields();
$this->init_settings();
$this->icon = $this->get_option('card_icon', plugins_url('/assets/images/cards.png', plugin_basename(dirname(__FILE__))));
- if (is_ssl()) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$this->icon = preg_replace("/^http:/i", "https:", $this->icon);
}
$this->icon = apply_filters('woocommerce_paypal_credit_card_rest_icon', $this->icon);
diff --git a/classes/wc-gateway-paypal-express-angelleye.php b/classes/wc-gateway-paypal-express-angelleye.php
index 2ffcfe213..9e184a10d 100644
--- a/classes/wc-gateway-paypal-express-angelleye.php
+++ b/classes/wc-gateway-paypal-express-angelleye.php
@@ -456,16 +456,16 @@ public function get_icon() {
if ($this->checkout_with_pp_button_type == 'customimage') {
$image_path = $this->pp_button_type_my_custom;
}
- if ( is_ssl() || get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$image_path = str_replace( 'http:', 'https:', $image_path );
}
if ($this->paypal_account_optional == 'no' && $this->show_paypal_credit == 'yes' && $this->checkout_with_pp_button_type == 'paypalimage') {
$image_path = plugins_url('/assets/images/paypal.png', plugin_basename(dirname(__FILE__)));
- if ( is_ssl() || get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$image_path = str_replace( 'http:', 'https:', $image_path );
}
$image_path_two = plugins_url('/assets/images/PP_credit_logo.png', plugin_basename(dirname(__FILE__)));
- if ( is_ssl() || get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$image_path_two = str_replace( 'http:', 'https:', $image_path_two );
}
$icon = "";
@@ -480,7 +480,7 @@ public function get_icon() {
public function init_form_fields() {
$rest_url = get_admin_url() . 'admin.php?page=wc-settings&tab=checkout§ion=paypal_express&pms_reset=true';
$require_ssl = '';
- if (!AngellEYE_Gateway_Paypal::is_ssl()) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$require_ssl = __('This image requires an SSL host. Please upload your image to www.sslpic.com and enter the image URL here.', 'paypal-for-woocommerce');
}
$skip_final_review_option_not_allowed_guest_checkout = '';
@@ -1353,7 +1353,7 @@ public static function angelleye_get_paypalimage() {
$image_path = plugins_url('/assets/images/dynamic-image/' . AngellEYE_Utility::get_button_locale_code() . '.png', plugin_basename(dirname(__FILE__)));
} else {
$image_path = plugins_url('/assets/images/dynamic-image/' . AngellEYE_Utility::get_button_locale_code() . '.gif', plugin_basename(dirname(__FILE__)));
- if ( is_ssl() || get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$image_path = preg_replace("/^http:/i", "https:", $image_path);
}
}
diff --git a/classes/wc-gateway-paypal-pro-angelleye.php b/classes/wc-gateway-paypal-pro-angelleye.php
index a28c76d76..4fb5fbbde 100644
--- a/classes/wc-gateway-paypal-pro-angelleye.php
+++ b/classes/wc-gateway-paypal-pro-angelleye.php
@@ -117,7 +117,7 @@ function __construct() {
//fix ssl for image icon
$this->icon = $this->get_option('card_icon', plugins_url('/assets/images/cards.png', plugin_basename(dirname(__FILE__))));
- if ( is_ssl() || get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$this->icon = preg_replace("/^http:/i", "https:", $this->icon);
}
$this->icon = apply_filters('woocommerce_paypal_pro_icon', $this->icon);
@@ -462,7 +462,7 @@ public function admin_options() {
*/
function is_available() {
if ($this->enabled == "yes") :
- if ($this->testmode == false && get_option('woocommerce_force_ssl_checkout') == 'no' && !class_exists('WordPressHTTPS')) return false;
+ if ($this->testmode == false && !is_ssl()) return false;
// Currency check
if (!in_array(get_woocommerce_currency(), apply_filters('woocommerce_paypal_pro_supported_currencies', array('AUD', 'CAD', 'CZK', 'DKK', 'EUR', 'HUF', 'JPY', 'NOK', 'NZD', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'USD')))) return false;
// Required fields check
diff --git a/classes/wc-gateway-paypal-pro-payflow-angelleye.php b/classes/wc-gateway-paypal-pro-payflow-angelleye.php
index 0ff00a744..17dfb950d 100644
--- a/classes/wc-gateway-paypal-pro-payflow-angelleye.php
+++ b/classes/wc-gateway-paypal-pro-payflow-angelleye.php
@@ -47,7 +47,7 @@ function __construct() {
//fix ssl for image icon
$this->icon = $this->get_option('card_icon', plugins_url('/assets/images/payflow-cards.png', plugin_basename(dirname(__FILE__))));
- if ( is_ssl() || get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
+ if ( is_ssl() || 'yes' === get_option( 'woocommerce_force_ssl_checkout' ) ) {
$this->icon = preg_replace("/^http:/i", "https:", $this->icon);
}
$this->icon = apply_filters('woocommerce_paypal_pro_payflow_icon', $this->icon);
diff --git a/paypal-for-woocommerce.php b/paypal-for-woocommerce.php
index 1930b41a9..67aed78a1 100644
--- a/paypal-for-woocommerce.php
+++ b/paypal-for-woocommerce.php
@@ -229,8 +229,8 @@ function admin_notices() {
if ((!empty($pp_pro['enabled']) && $pp_pro['enabled'] == 'yes') || ( !empty($pp_payflow['enabled']) && $pp_payflow['enabled']=='yes' )) {
// Show message if enabled and FORCE SSL is disabled and WordpressHTTPS plugin is not detected
- if ( get_option('woocommerce_force_ssl_checkout')=='no' && ! class_exists( 'WordPressHTTPS' ) && !get_user_meta($user_id, 'ignore_pp_ssl') )
- echo '
' . sprintf(__('WooCommerce PayPal Payments Pro requires that the %s option is enabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - PayPal Pro will only work in test mode.', 'paypal-for-woocommerce'), 'Force secure checkout') . '
' . sprintf(__('WooCommerce PayPal Payments Pro requires that the %s option is enabled; your checkout may not be secure! Please enable SSL and ensure your server has a valid SSL certificate - PayPal Pro will only work in test mode.', 'paypal-for-woocommerce'), 'Force secure checkout') . '