silent newsletter, and detect fabrication card on fabrication page

This commit is contained in:
asus
2024-05-04 15:49:13 +02:00
parent 03b24baaff
commit 3abe90b6d3
3 changed files with 27 additions and 2 deletions

View File

@@ -112,6 +112,7 @@ class Cipf {
const SLUG_COMMAND_CARD = 'commande';
const SLUG_PAGE_REDIRECTION = 'redirection_cipf';
const SLUG_PAYPAL_PAGE = 'paiement';
const SLUG_PAYPAL_FABRICATION = 'fabrication';
const SLUG_PAYPAL_REDIRECTION_SUCCESS = self::SLUG_PAGE_REDIRECTION;
const SLUG_PAYPAL_REDIRECTION_FAILURE = self::SLUG_PAGE_REDIRECTION;
const SLUG_ADMIN_VALIDATE_PROF = 'admin_activate_prof_cipf'; // for admin_modif_prof.php

View File

@@ -49,6 +49,30 @@ function payment_page_checks_CIPF() {
// get the user id
$user_id = get_current_user_id();
}
add_action('wp', 'payment_page_checks_CIPF');
/*
* check on fabrication page to check card change
*
*/
function fabrication_page_checks_CIPF() {
Plgntls::debug_infos(2);
$slug_paypal_fabrication = Cipf::SLUG_PAYPAL_FABRICATION;
// check the slug
if (!is_page($slug_paypal_fabrication)) {
return;
}
Plgntls::debug_infos();
// get the user id
$user_id = get_current_user_id();
/*
* check for query card change
@@ -63,7 +87,7 @@ function payment_page_checks_CIPF() {
reset_acf_prof_change_card_CIPF();
}
}
add_action('wp', 'payment_page_checks_CIPF');
add_action('wp', 'fabrication_page_checks_CIPF');

Submodule private updated: 50f4c09ee3...675cdf94c9