update acf field handling to centerize every call

This commit is contained in:
asus
2024-04-08 21:43:08 +02:00
parent 1e291d16ba
commit 4c0e4c001f
12 changed files with 538 additions and 126 deletions

View File

@@ -40,7 +40,7 @@ include_once(Plgntls::root_path() . 'php/partners_register.php');
include_once(Plgntls::root_path() . 'php/partners_page.php');
include_once(Plgntls::root_path() . 'php/partners_form.php');
// utils
include_once(Plgntls::root_path() . 'php/_utils_states.php');
include_once(Plgntls::root_path() . 'php/_utils_acf_fields.php');
include_once(Plgntls::root_path() . 'php/_utils_redirections.php');
include_once(Plgntls::root_path() . 'php/_utils_display_css.php');
include_once(Plgntls::root_path() . 'php/_utils_checks_roles.php');
@@ -81,6 +81,7 @@ class Cipf {
const ACF_ACCOUNT_STATE = ['_name'=>'etat_compte', 'new'=>'nouveau prof', 'to_pay'=>'doit payer', 'valid'=>'carte valide', 'waiting_invalid'=>'en attente invalide', 'waiting_valid'=>'en attente valide', 'expired'=>'carte expiree'];
const ACF_TRANSFERT_STATE = ['_name'=>'etat_virement', 'success'=>'virement validé'];
const ACF_PAGE_STATE = ['_name'=>'etat_page_partenaire', 'publish'=>'Publiee', 'draft'=>'Brouillon'];
const ACF_CARD_ORDER_ID = ['_name'=>'order_id'];
// META
const META_PAYEMENT_STATUS = 'cipf_payement_status';
@@ -129,6 +130,15 @@ class Cipf {
// SHORTCODES
// SCHEDULED EVENTS
const DURATION_OLD_ORDER_ID = '3 days';
const DURATION_ACCOUNT_DELETE_AFTER_EXPIRE = '6 months';
const DURATION_REMINDER_BEFORE_ACCOUNT_EXPIRE_FIRST = '1 month';
const DURATION_REMINDER_BEFORE_ACCOUNT_EXPIRE_LAST = '7 days';
const DURATION_REMINDER_BEFORE_ACCOUNT_DELETE_FIRST = '1 month';
const DURATION_REMINDER_BEFORE_ACCOUNT_DELETE_LAST = '7 days';
const DURATION_REMINDER_BEFORE_OFFER_EXPIRE = '7 days';
// OPTIONS
const OPTION_PAYPAL = [
'_name'=>'cipf_paypal_credentials',