partner redirection to page creation

This commit is contained in:
asus
2024-03-19 23:48:40 +01:00
parent 1248c2339d
commit 61063cabd9
5 changed files with 65 additions and 147 deletions

View File

@@ -0,0 +1,41 @@
<?php
/*
* it means someone outside wp is accessing the file, in this case kill it.
*/
if (!defined('ABSPATH')) {
die('You can not access this file!');
}
/*
* add a schedule event to delete this order_id
* after 3 days ?
* time() + 60 = one minute from now
* time() + MINUTE_IN_SECONDS = one minute from now
* -> https://codex.wordpress.org/Easier_Expression_of_Time_Constants
* -> also strtotime : https://www.php.net/manual/en/function.strtotime.php
*
*/
//function schedule_delete_orderid_CIPF($user_id, $order_id) {
// PLGNTLS_class::debug_infos();
// $delay = time() + MINUTE_IN_SECONDS;
// wp_schedule_single_event($delay, 'orderid_deletion_event_CIPF', array($user_id, $order_id));
//}
//function delete_order_id_later_CIPF($user_id, $order_id) {
// PLGNTLS_class::debug_infos();
// delete_user_meta($user_id, 'cipf_order_id', $order_id);
//}
//add_action('orderid_deletion_event_CIPF', 'delete_order_id_later_CIPF', 5, 2);
?>