- updated all occurences of Plgntls:: constantes for Cipf:: const
- update menu to use the new methods
This commit is contained in:
@@ -18,7 +18,7 @@ if (!defined('ABSPATH')) {
|
||||
*/
|
||||
function payment_page_checks_CIPF() {
|
||||
Plgntls::debug_infos(2);
|
||||
$slug_paypal_page = Plgntls::SLUG_PAYPAL_PAGE;
|
||||
$slug_paypal_page = Cipf::SLUG_PAYPAL_PAGE;
|
||||
|
||||
// check the slug
|
||||
if (!is_page($slug_paypal_page)) {
|
||||
@@ -43,8 +43,8 @@ add_action('wp', 'payment_page_checks_CIPF');
|
||||
*/
|
||||
function payment_page_redirects_CIPF() {
|
||||
Plgntls::debug_infos(2);
|
||||
$slug_paypal_page = Plgntls::SLUG_PAYPAL_PAGE;
|
||||
$role_prof = Plgntls::ROLE_PROF;
|
||||
$slug_paypal_page = Cipf::SLUG_PAYPAL_PAGE;
|
||||
$role_prof = Cipf::ROLE_PROF;
|
||||
|
||||
// don't redirect if it is the divi builder mode
|
||||
if (et_fb_is_enabled()) {
|
||||
@@ -78,7 +78,7 @@ add_action('template_redirect', 'payment_page_redirects_CIPF');
|
||||
*/
|
||||
function payment_page_scripts_CIPF() {
|
||||
Plgntls::debug_infos(2);
|
||||
$slug_paypal_page = Plgntls::SLUG_PAYPAL_PAGE;
|
||||
$slug_paypal_page = Cipf::SLUG_PAYPAL_PAGE;
|
||||
|
||||
// check the slug
|
||||
if (!is_page($slug_paypal_page)) {
|
||||
|
||||
@@ -92,7 +92,7 @@ function handle_orders_request_CIPF($request_data) {
|
||||
function create_order_CIPF() {
|
||||
Plgntls::debug_infos();
|
||||
$paypal_api_base_url = get_paypal_api_base_url_CIPF();
|
||||
$acf_card_price_total = Plgntls::ACF_CARD_PRICE_TOTAL;
|
||||
$acf_card_price_total = Cipf::ACF_CARD_PRICE_TOTAL;
|
||||
|
||||
$access_token = generate_access_token_CIPF();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ function routes_endpoints_CIPF() {
|
||||
if (is_admin()) {
|
||||
return;
|
||||
}
|
||||
$base_rest_route = Plgntls::URL_BASE_REST_ROUTE;
|
||||
$base_rest_route = Cipf::URL_BASE_REST_ROUTE;
|
||||
register_rest_route($base_rest_route, '/orders', array(
|
||||
'methods' => 'POST',
|
||||
'callback' => 'handle_orders_request_CIPF',
|
||||
|
||||
@@ -17,8 +17,8 @@ if (!defined('ABSPATH')) {
|
||||
*/
|
||||
function paypal_shortcode_content_CIPF() {
|
||||
Plgntls::debug_infos();
|
||||
$slug_paypal_redirection_success = Plgntls::SLUG_PAYPAL_REDIRECTION_SUCCESS;
|
||||
$slug_paypal_redirection_failure = Plgntls::SLUG_PAYPAL_REDIRECTION_FAILURE;
|
||||
$slug_paypal_redirection_success = Cipf::SLUG_PAYPAL_REDIRECTION_SUCCESS;
|
||||
$slug_paypal_redirection_failure = Cipf::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();
|
||||
|
||||
@@ -36,8 +36,8 @@ if (!defined('ABSPATH')) {
|
||||
*/
|
||||
function update_user_pre_order_CIPF($message) {
|
||||
Plgntls::debug_infos();
|
||||
$acf_payment_status = Plgntls::ACF_CARD_PAYMENT_STATE;
|
||||
$meta_order_id = Plgntls::META_ORDER_ID;
|
||||
$acf_payment_status = Cipf::ACF_CARD_PAYMENT_STATE;
|
||||
$meta_order_id = Cipf::META_ORDER_ID;
|
||||
|
||||
$order_id = $message->id;
|
||||
$user_id = get_current_user_id();
|
||||
@@ -128,7 +128,7 @@ function update_user_post_capture_CIPF($message) {
|
||||
*/
|
||||
function failure_payment_for_user_CIPF($user_id, $order_id, $status) {
|
||||
Plgntls::debug_infos();
|
||||
$meta_order_id = Plgntls::META_ORDER_ID;
|
||||
$meta_order_id = Cipf::META_ORDER_ID;
|
||||
|
||||
$acf_id = 'user_'.$user_id;
|
||||
|
||||
@@ -150,7 +150,7 @@ function failure_payment_for_user_CIPF($user_id, $order_id, $status) {
|
||||
*/
|
||||
function success_payment_for_user_CIPF($user_id, $order_id) {
|
||||
Plgntls::debug_infos();
|
||||
$meta_order_id = Plgntls::META_ORDER_ID;
|
||||
$meta_order_id = Cipf::META_ORDER_ID;
|
||||
|
||||
$acf_id = 'user_'.$user_id;
|
||||
|
||||
@@ -186,8 +186,8 @@ function success_payment_for_user_CIPF($user_id, $order_id) {
|
||||
*/
|
||||
function find_user_with_order_id_CIPF($current_user_id, $order_id) {
|
||||
Plgntls::debug_infos();
|
||||
$meta_order_id = Plgntls::META_ORDER_ID;
|
||||
$role_prof = Plgntls::ROLE_PROF;
|
||||
$meta_order_id = Cipf::META_ORDER_ID;
|
||||
$role_prof = Cipf::ROLE_PROF;
|
||||
|
||||
$user_metas = get_user_meta($current_user_id, $meta_order_id, false);
|
||||
if (in_array($order_id, $user_metas)) {
|
||||
|
||||
@@ -43,12 +43,12 @@ function get_acf_value_CIPF($acf_field, $acf_id) {
|
||||
*/
|
||||
function check_can_pay_CIPF() {
|
||||
Plgntls::debug_infos();
|
||||
$acf_card_payment_method = Plgntls::ACF_CARD_PAYMENT_METHOD;
|
||||
$acf_card_price_choice = Plgntls::ACF_CARD_PRICE_CHOICE;
|
||||
$acf_card_price_delivery = Plgntls::ACF_CARD_PRICE_DELIVERY;
|
||||
$acf_card_price_total = Plgntls::ACF_CARD_PRICE_TOTAL;
|
||||
$acf_card_expiration = Plgntls::ACF_CARD_EXPIRATION;
|
||||
$card_renew_period = Plgntls::CARD_RENEW_PERIOD;
|
||||
$acf_card_payment_method = Cipf::ACF_CARD_PAYMENT_METHOD;
|
||||
$acf_card_price_choice = Cipf::ACF_CARD_PRICE_CHOICE;
|
||||
$acf_card_price_delivery = Cipf::ACF_CARD_PRICE_DELIVERY;
|
||||
$acf_card_price_total = Cipf::ACF_CARD_PRICE_TOTAL;
|
||||
$acf_card_expiration = Cipf::ACF_CARD_EXPIRATION;
|
||||
$card_renew_period = Cipf::CARD_RENEW_PERIOD;
|
||||
|
||||
$current_user = wp_get_current_user();
|
||||
$user_id = get_current_user_id();
|
||||
|
||||
Reference in New Issue
Block a user