- renew state : removed

- payment state : in acf
This commit is contained in:
asus
2024-03-10 14:51:47 +01:00
parent b457ed119e
commit 9ee35b23bc
5 changed files with 8 additions and 72 deletions

View File

@@ -72,7 +72,6 @@ function handle_prof_is_activ_CIPF($author_id) {
function show_prof_paiement_messages_CIPF($user_id) {
PLGNTLS_class::debug_infos();
$acf_prof_is_activ = PLGNTLS_class::ACF_PROF_IS_ACTIV;
//$meta_payement_status = PLGNTLS_class::META_PAYEMENT_STATUS;
$acf_payment_status = PLGNTLS_class::ACF_CARD_PAYMENT_STATE;
$acf_id = 'user_' . $user_id;
@@ -89,22 +88,18 @@ function show_prof_paiement_messages_CIPF($user_id) {
$cipf_prof_payement = new PLGNTLS_class();
//$payement_status = get_user_meta($user_id, $meta_payement_status, true);
$payement_status = get_field($acf_payment_status['_name'], $acf_id);
//if ($payement_status === 'success') {
if ($payement_status === $acf_payment_status['success']) {
$cipf_prof_payement->add_to_front(array(
array( 'css' => '#cipf_prof_paiement_reussi {display: block;}' )
array( 'css' => '.cipf_prof_paiement_message#cipf_prof_paiement_reussi {display: block;}' )
));
}
//else if ($payement_status === 'started') {
else if ($payement_status === $acf_payment_status['failure']) {
$cipf_prof_payement->add_to_front(array(
array( 'css' => '#cipf_prof_paiement_echoue {display: block;}' )
array( 'css' => '.cipf_prof_paiement_message#cipf_prof_paiement_echoue {display: block;}' )
));
}
//update_user_meta($user_id, $meta_payement_status, '');
update_field($acf_payment_status['_name'], $acf_payment_status['nothing'], $acf_id);
}