updates acf fields const values in class to avoid errors
This commit is contained in:
@@ -56,33 +56,118 @@ if (!defined('ABSPATH')) {
|
||||
|
||||
class PLGNTLS_class
|
||||
{
|
||||
/*
|
||||
* const declarations
|
||||
*
|
||||
*/
|
||||
// ACF
|
||||
const ACF_CARD_STATE = ['_name'=>'etat_carte', 'new'=>'Commande', 'renew'=>'Renouvellement'];
|
||||
const ACF_CARD_PAYMENT_METHOD = ['_name'=>'paiement', 'paypal'=>'Paypal', 'transfert'=>'Virement'];
|
||||
const ACF_CARD_PRICE_CHOICE = ['_name'=>'tarif', 'low'=>'10', 'high'=>'15'];
|
||||
const ACF_CARD_PRICE_DELIVERY = ['_name'=>'livraison', 'pdf'=>'PDF', 'post'=>'Fabrication'];
|
||||
const ACF_PROF_IS_ACTIV = ['_name'=>'compte-actif', 'activ'=>'Actif', 'inactiv'=>'Inactif'];
|
||||
const ACF_PROF_CGV = ['_name'=>'cgv', 'cgv'=>'cgv'];
|
||||
const ACF_PROF_CAN_RENEW = ['_name'=>'renouvellement_possible', 'can'=>true, 'cannot'=>false];
|
||||
const ACF_CARD_PRICE_TOTAL = ['_name'=>'somme_a_regler']; // input number
|
||||
const ACF_CARD_EXPIRATION = ['_name'=>'fin_de_validite']; // input date
|
||||
|
||||
/*
|
||||
const ACF_CARD_STATE = [
|
||||
'_name' => 'etat_carte',
|
||||
'new' => 'Commande',
|
||||
'renew' => 'Renouvellement',
|
||||
];
|
||||
|
||||
const ACF_CARD_PAYMENT_METHOD = [
|
||||
'_name' => 'paiement',
|
||||
'paypal' => 'Paypal',
|
||||
'transfert' => 'Virement',
|
||||
];
|
||||
|
||||
const ACF_CARD_PRICE_CHOICE = [
|
||||
'_name' => 'tarif',
|
||||
'low' => '10',
|
||||
'high' => '15',
|
||||
];
|
||||
|
||||
const ACF_CARD_PRICE_DELIVERY = [
|
||||
'_name' => 'livraison',
|
||||
'pdf' => 'PDF',
|
||||
'post' => 'Fabrication',
|
||||
];
|
||||
|
||||
const ACF_PROF_IS_ACTIV = [
|
||||
'_name' => 'compte-actif',
|
||||
'activ' => 'Actif',
|
||||
'inactiv' => 'Inactif',
|
||||
];
|
||||
|
||||
const ACF_PROF_CGV = [
|
||||
'_name' => 'cgv',
|
||||
'cgv' => 'cgv',
|
||||
];
|
||||
|
||||
const ACF_PROF_CAN_RENEW = [
|
||||
'_name' => 'renouvellement_possible',
|
||||
'can' => true,
|
||||
'cannot' => false,
|
||||
];
|
||||
|
||||
const ACF_CARD_PRICE_TOTAL = ['_name' => 'somme_a_regler']; // input number
|
||||
const ACF_CARD_EXPIRATION = ['_name' => 'fin_de_validite']; // input date
|
||||
*/
|
||||
|
||||
/*
|
||||
const ACF_CARD_STATE = 'etat_carte';
|
||||
const ACF_CARD_STATE__FIRST = 'Commande';
|
||||
const ACF_CARD_STATE__RENEW = 'Renouvellement';
|
||||
|
||||
const ACF_CARD_PAYMENT_METHOD = 'paiement';
|
||||
const ACF_CARD_PAYMENT_METHOD__PAYPAL = 'Paypal';
|
||||
const ACF_CARD_PAYMENT_METHOD__TRANSFERT = 'Virement';
|
||||
|
||||
const ACF_CARD_PRICE_CHOICE = 'tarif';
|
||||
const ACF_CARD_PRICE_CHOICE__LOW = '10';
|
||||
const ACF_CARD_PRICE_CHOICE__HIGH = '15';
|
||||
|
||||
const ACF_CARD_PRICE_DELIVERY = 'livraison';
|
||||
const ACF_CARD_PRICE_TOTAL = 'somme_a_regler';
|
||||
const ACF_CARD_EXPIRATION = 'fin_de_validite';
|
||||
const ACF_CARD_PRICE_DELIVERY__PDF = 'PDF';
|
||||
const ACF_CARD_PRICE_DELIVERY__POST = 'Fabrication';
|
||||
|
||||
const ACF_PROF_IS_ACTIV = 'compte-actif';
|
||||
const ACF_PROF_CAN_RENEW = 'renouvellement_possible';
|
||||
const ACF_PROF_IS_ACTIV__ACTIV = 'Actif';
|
||||
const ACF_PROF_IS_ACTIV__INACTIV = 'Inactif';
|
||||
|
||||
const ACF_PROF_CGV = 'cgv';
|
||||
const ACF_PROF_CGV__CGV = 'cgv';
|
||||
|
||||
const CARD_RENEW_PERIOD = 31; // int : number of days before expiration when renew card start to be possible
|
||||
const CARD_VALIDITY_TIME = '1 year'; // string : time of validity of the card (ex: '1 month' or '1 year' or '60 days')
|
||||
const ACF_CARD_PRICE_TOTAL = 'somme_a_regler'; // input number
|
||||
const ACF_CARD_EXPIRATION = 'fin_de_validite'; // input date
|
||||
const ACF_PROF_CAN_RENEW = 'renouvellement_possible'; // input true/false
|
||||
*/
|
||||
|
||||
// META
|
||||
const META_PAYEMENT_STATUS = 'cipf_payement_status';
|
||||
|
||||
// SLUG
|
||||
const SLUG_PROF_INACTIV = 'validation-en-cours';
|
||||
const SLUG_RENEW_CARD = 'commande';
|
||||
const SLUG_PAGE_REDIRECTION = 'redirection_cipf';
|
||||
const SLUG_PAYPAL_REDIRECTION_SUCCESS = self::SLUG_PAGE_REDIRECTION;
|
||||
const SLUG_PAYPAL_REDIRECTION_FAILURE = self::SLUG_PAGE_REDIRECTION;
|
||||
|
||||
const USER_INFO_DATE_FORMAT = 'd/m/Y'; // for user_infos.php (date format : https://www.php.net/manual/fr/datetime.format.php)
|
||||
|
||||
// PAYPAL
|
||||
const PAYPAL_CLIENT_ID = "AfcmwxIXlG2ZxaMdjazX57I70BXz__aEqNWaTnqfSCI34a0V7nMbytswx7EViUjlpHs7opyrRwaH9YLl";
|
||||
const PAYPAL_CLIENT_SECRET = "EGunIhGRjPvn0Z8wXO0JsdhET30OStTAH_IyRsmhimEN23_qiRSFD-ql4tvnulKJw6TitZ-vU-ytc4A-";
|
||||
const PAYPAL_API_BASE_URL = "https://api-m.sandbox.paypal.com";
|
||||
const PAYPAL_MESSAGE_SUCCESS = '`paiement reussi`';
|
||||
const PAYPAL_MESSAGE_FAILURE = '`paiement raté`';
|
||||
|
||||
// OTHER
|
||||
const CARD_RENEW_PERIOD = 31; // int : number of days before expiration when renew card start to be possible
|
||||
const CARD_VALIDITY_TIME = '1 year'; // string : time of validity of the card (ex: '1 month' or '1 year' or '60 days')
|
||||
const USER_INFO_DATE_FORMAT = 'd/m/Y'; // for user_infos.php (date format : https://www.php.net/manual/fr/datetime.format.php)
|
||||
|
||||
|
||||
|
||||
private static $_root_path;
|
||||
|
||||
Reference in New Issue
Block a user