Files
2024_WEBSITE_fipf/plugins/cipf_plugin/php/scheduled_events.php
asus ade0be87ce updated plgntls :
- renamed PLGNTLS_class -> Plgntls
- changed method 'add_to_front()' to static method
- moved fetch script as inline script, so the plgntls file is single
- improved the way inline script and styles are added
2024-03-29 21:56:12 +01:00

42 lines
937 B
PHP

<?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::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::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);
?>