updated plgntls :
- renamed PLGNTLS_class -> Plgntls - changed method 'add_to_front()' to static method - moved fetch script as inline script, so the plgntls file is single - improved the way inline script and styles are added
This commit is contained in:
@@ -12,8 +12,8 @@ if (!defined('ABSPATH')) {
|
||||
|
||||
|
||||
function set_paypal_options_CIPF($is_sandbox, $client_id, $client_secret) {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$option_paypal = PLGNTLS_class::OPTION_PAYPAL;
|
||||
Plgntls::debug_infos();
|
||||
$option_paypal = Plgntls::OPTION_PAYPAL;
|
||||
|
||||
$option_data = array();
|
||||
$option_data['is_sandbox'] = $is_sandbox;
|
||||
@@ -28,8 +28,8 @@ function set_paypal_options_CIPF($is_sandbox, $client_id, $client_secret) {
|
||||
|
||||
|
||||
function get_paypal_options_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$option_paypal = PLGNTLS_class::OPTION_PAYPAL;
|
||||
Plgntls::debug_infos();
|
||||
$option_paypal = Plgntls::OPTION_PAYPAL;
|
||||
|
||||
$paypal_credentials_serialized = get_option($option_paypal['_name']);
|
||||
if (false === $paypal_credentials_serialized) {
|
||||
@@ -46,26 +46,26 @@ function get_paypal_options_CIPF() {
|
||||
|
||||
|
||||
function get_paypal_client_id_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
Plgntls::debug_infos();
|
||||
$paypal_credentials = get_paypal_options_CIPF();
|
||||
return $paypal_credentials['client_id'];
|
||||
}
|
||||
function get_paypal_client_secret_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
Plgntls::debug_infos();
|
||||
$paypal_credentials = get_paypal_options_CIPF();
|
||||
return $paypal_credentials['client_secret'];
|
||||
}
|
||||
function get_paypal_api_base_url_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
Plgntls::debug_infos();
|
||||
$paypal_credentials = get_paypal_options_CIPF();
|
||||
|
||||
$paypal_base_url = '';
|
||||
$is_sandbox = $paypal_credentials['is_sandbox'];
|
||||
if ($is_sandbox) {
|
||||
$paypal_base_url = PLGNTLS_class::PAYPAL_SBOX_API_BASE_URL;
|
||||
$paypal_base_url = Plgntls::PAYPAL_SBOX_API_BASE_URL;
|
||||
}
|
||||
else {
|
||||
$paypal_base_url = PLGNTLS_class::PAYPAL_LIVE_API_BASE_URL;
|
||||
$paypal_base_url = Plgntls::PAYPAL_LIVE_API_BASE_URL;
|
||||
}
|
||||
return $paypal_base_url;
|
||||
}
|
||||
@@ -79,8 +79,8 @@ function get_paypal_api_base_url_CIPF() {
|
||||
*/
|
||||
|
||||
function set_payment_messages_option_CIPF($success, $failure) {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$option_payment = PLGNTLS_class::OPTION_PAYMENT;
|
||||
Plgntls::debug_infos();
|
||||
$option_payment = Plgntls::OPTION_PAYMENT;
|
||||
|
||||
$option_data = array();
|
||||
$option_data['success'] = $success;
|
||||
@@ -90,8 +90,8 @@ function set_payment_messages_option_CIPF($success, $failure) {
|
||||
}
|
||||
|
||||
function get_payment_messages_option_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$option_payment = PLGNTLS_class::OPTION_PAYMENT;
|
||||
Plgntls::debug_infos();
|
||||
$option_payment = Plgntls::OPTION_PAYMENT;
|
||||
|
||||
$payment_option_serialized = get_option($option_payment['_name']);
|
||||
if (false === $payment_option_serialized) {
|
||||
@@ -103,13 +103,13 @@ function get_payment_messages_option_CIPF() {
|
||||
}
|
||||
|
||||
function get_payment_message_success_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
Plgntls::debug_infos();
|
||||
$payment_option = get_payment_messages_option_CIPF();
|
||||
return $payment_option['success'];
|
||||
}
|
||||
|
||||
function get_payment_message_failure_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
Plgntls::debug_infos();
|
||||
$payment_option = get_payment_messages_option_CIPF();
|
||||
return $payment_option['failure'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user