partner redirection to page creation
This commit is contained in:
41
plugins/cipf_plugin/php/scheduled_events.php
Normal file
41
plugins/cipf_plugin/php/scheduled_events.php
Normal 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);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user