diff --git a/plugins/cipf_plugin/cipf_plugin.php b/plugins/cipf_plugin/cipf_plugin.php index edeff9a..fd29045 100644 --- a/plugins/cipf_plugin/cipf_plugin.php +++ b/plugins/cipf_plugin/cipf_plugin.php @@ -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 diff --git a/plugins/cipf_plugin/php/paypal/payment_page.php b/plugins/cipf_plugin/php/paypal/payment_page.php index 82ea85d..9c9ef7f 100644 --- a/plugins/cipf_plugin/php/paypal/payment_page.php +++ b/plugins/cipf_plugin/php/paypal/payment_page.php @@ -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'); diff --git a/private b/private index 50f4c09..675cdf9 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 50f4c09ee3e014edfef6804a9f6334cabf77fb12 +Subproject commit 675cdf94c9c4362fb48f9cba3d917b9f9d210257