fixe small pbm with card change
This commit is contained in:
@@ -113,6 +113,9 @@ function get_paypal_price_CIPF($user_id = null) {
|
|||||||
if (is_paypal_force_1_cent_CIPF($user_id)) {
|
if (is_paypal_force_1_cent_CIPF($user_id)) {
|
||||||
$price = "0.01";
|
$price = "0.01";
|
||||||
}
|
}
|
||||||
|
else if (is_acf_prof_change_card_CIPF($user_id)) {
|
||||||
|
$price = "5";
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$price = get_card_price_CIPF($user_id);
|
$price = get_card_price_CIPF($user_id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ function get_field_init_CIPF($acf_field_name, $acf_id) {
|
|||||||
Plgntls::debug_infos();
|
Plgntls::debug_infos();
|
||||||
$acf_state = get_field($acf_field_name, $acf_id);
|
$acf_state = get_field($acf_field_name, $acf_id);
|
||||||
|
|
||||||
error_log("acf_state: " . json_encode($acf_state));
|
|
||||||
if ($acf_state !== null) {
|
if ($acf_state !== null) {
|
||||||
return $acf_state;
|
return $acf_state;
|
||||||
}
|
}
|
||||||
@@ -72,7 +71,6 @@ error_log("acf_state: " . json_encode($acf_state));
|
|||||||
update_field($acf_field_name, '', $acf_id);
|
update_field($acf_field_name, '', $acf_id);
|
||||||
$acf_object = get_field_object($acf_field_name, $acf_id);
|
$acf_object = get_field_object($acf_field_name, $acf_id);
|
||||||
|
|
||||||
error_log("acf_object: " . json_encode($acf_object));
|
|
||||||
|
|
||||||
$default = '';
|
$default = '';
|
||||||
if (isset($acf_object['default_value'])) {
|
if (isset($acf_object['default_value'])) {
|
||||||
@@ -571,26 +569,26 @@ function get_card_price_CIPF($user_id = null) {
|
|||||||
$acf_id = 'user_'.$user_id;
|
$acf_id = 'user_'.$user_id;
|
||||||
return get_acf_field_CIPF($acf_card_price_total, $acf_id);
|
return get_acf_field_CIPF($acf_card_price_total, $acf_id);
|
||||||
}
|
}
|
||||||
//function set_card_price_CIPF($value, $user_id = null) {
|
function set_card_price_CIPF($value, $user_id = null) {
|
||||||
// Plgntls::debug_infos();
|
Plgntls::debug_infos();
|
||||||
// $acf_card_price_total = Cipf::ACF_CARD_PRICE_TOTAL;
|
$acf_card_price_total = Cipf::ACF_CARD_PRICE_TOTAL;
|
||||||
//
|
|
||||||
// if (is_null($user_id)) {
|
if (is_null($user_id)) {
|
||||||
// $user_id = get_current_user_id();
|
$user_id = get_current_user_id();
|
||||||
// }
|
}
|
||||||
// $acf_id = 'user_'.$user_id;
|
$acf_id = 'user_'.$user_id;
|
||||||
// set_acf_field_CIPF($acf_card_price_total, $value, $acf_id);
|
set_acf_field_CIPF($acf_card_price_total, $value, $acf_id);
|
||||||
//}
|
}
|
||||||
//function reset_card_price_CIPF($user_id = null) {
|
function reset_card_price_CIPF($user_id = null) {
|
||||||
// Plgntls::debug_infos();
|
Plgntls::debug_infos();
|
||||||
// $acf_card_price_total = Cipf::ACF_CARD_PRICE_TOTAL;
|
$acf_card_price_total = Cipf::ACF_CARD_PRICE_TOTAL;
|
||||||
//
|
|
||||||
// if (is_null($user_id)) {
|
if (is_null($user_id)) {
|
||||||
// $user_id = get_current_user_id();
|
$user_id = get_current_user_id();
|
||||||
// }
|
}
|
||||||
// $acf_id = 'user_'.$user_id;
|
$acf_id = 'user_'.$user_id;
|
||||||
// set_acf_field_CIPF($acf_card_price_total, 0, $acf_id);
|
set_acf_field_CIPF($acf_card_price_total, 0, $acf_id);
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user