created plugin custer, and removed shortcodes change_id and user_infos from cipf plugin

This commit is contained in:
asus
2024-03-17 02:27:28 +01:00
parent 494943e4f7
commit 6ad1fb5137
13 changed files with 668 additions and 127 deletions

View File

@@ -44,9 +44,81 @@ function check_can_pay_CIPF() {
* in case it was changed from admin pannel
*
*/
$tarif = (int)get_field($acf_card_price_choice['_name'], $acf_id);
$livraison = (int)get_field($acf_card_price_delivery['_name'], $acf_id);
$price = $tarif + $livraison;
$tarif_object = get_field_object($acf_card_price_choice['_name'], $acf_id);
error_log("tarif_object");
error_log(json_encode($tarif_object));
/*
{
"ID":34541,
"key":"field_65d24447cc89f",
"label":"Tarif",
"name":"tarif",
"aria-label":"",
"prefix":"acf",
"type":"radio",
"value":"Je suis hors r\u00e9seau FIPF et je souhaite commander la carte \u00e0 15 \u20ac",
"menu_order":3,
"instructions":"",
"required":0,
"id":"",
"class":"",
"conditional_logic":0,
"parent":34538,
"wrapper":{
"width":"",
"class":"",
"id":""
},
"choices":{
"10":"Mon association adh\u00e8re \u00e0 la FIPF, je peux commander la carte \u00e0 10 \u20ac",
"15":"Je suis hors r\u00e9seau FIPF et je souhaite commander la carte \u00e0 15 \u20ac"
},
"default_value":"",
"return_format":"label",
"allow_null":0,
"other_choice":0,
"layout":"vertical",
"save_other_choice":0,
"_name":"tarif",
"_valid":1
}
{
"ID":34541,
"key":"field_65d24447cc89f",
"label":"Tarif",
"name":"tarif",
"aria-label":"",
"prefix":"acf",
"type":"radio",
"value":"15",
"menu_order":3,
"instructions":"",
"required":0,"id":"",
"class":"",
"conditional_logic":0,
"parent":34538,
"wrapper":{"width":"","class":"","id":""},
"choices":{
"10":"Mon association adh\u00e8re \u00e0 la FIPF, je peux commander la carte \u00e0 10 \u20ac",
"15":"Je suis hors r\u00e9seau FIPF et je souhaite commander la carte \u00e0 15 \u20ac"
},
"default_value":"",
"return_format":"value",
"allow_null":0,
"other_choice":0,
"layout":"vertical",
"save_other_choice":0,
"_name":"tarif",
"_valid":1
}
*/
// $tarif_value = ;
// $tarif = (int)$tarif_value;
$livraison_object = get_field_object($acf_card_price_delivery['_name'], $acf_id);
// $livraison_value = ;
// $livraison = (int)$livraison_value;
// $price = $tarif + $livraison;
$price = 3;
update_field($acf_card_price_total['_name'], $price, $acf_id);
/*