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:
@@ -16,16 +16,15 @@ if (!defined('ABSPATH')) {
|
||||
* call to paypal_shortcode_content()
|
||||
*/
|
||||
function paypal_shortcode_content_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
$slug_paypal_redirection_success = PLGNTLS_class::SLUG_PAYPAL_REDIRECTION_SUCCESS;
|
||||
$slug_paypal_redirection_failure = PLGNTLS_class::SLUG_PAYPAL_REDIRECTION_FAILURE;
|
||||
Plgntls::debug_infos();
|
||||
$slug_paypal_redirection_success = Plgntls::SLUG_PAYPAL_REDIRECTION_SUCCESS;
|
||||
$slug_paypal_redirection_failure = Plgntls::SLUG_PAYPAL_REDIRECTION_FAILURE;
|
||||
$paypal_client_id = get_paypal_client_id_CIPF();
|
||||
$paypal_message_success = get_payment_message_success_CIPF();
|
||||
$paypal_message_failure = get_payment_message_failure_CIPF();
|
||||
|
||||
// if (!can_pay_now_CIPF())
|
||||
// return no_payment_CIPF();
|
||||
$cipfcard_paypal = new PLGNTLS_class();
|
||||
|
||||
$pp_client_id = $paypal_client_id;
|
||||
$pp_sdk_currency = "EUR";
|
||||
@@ -35,7 +34,7 @@ function paypal_shortcode_content_CIPF() {
|
||||
$paypal_redirection_success = home_url() . '/' . $slug_paypal_redirection_success;
|
||||
$paypal_redirection_failure = home_url() . '/' . $slug_paypal_redirection_failure;
|
||||
|
||||
$added_to_front = $cipfcard_paypal->add_to_front(
|
||||
$added_to_front = Plgntls::add_to_front(
|
||||
array(
|
||||
$pp_sdk_url,
|
||||
array("js/paypal/paypal.js", 'type'=>'module'),
|
||||
@@ -55,7 +54,7 @@ add_shortcode('cipf_paypal_shortcode', 'paypal_shortcode_content_CIPF');
|
||||
|
||||
|
||||
function no_payment_CIPF() {
|
||||
PLGNTLS_class::debug_infos();
|
||||
Plgntls::debug_infos();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user