I'm creating a function in wordpress to schedule events as follows:
add_action( 'wp', 'prefix_setup_schedule' );
function prefix_setup_schedule() {
if ( ! wp_next_scheduled( 'send_email' ) ) {
wp_schedule_event( time(), 'daily', 'send_email');
}
}
But this team would have to be at 6:00 pm and not the time it was registered, so I wanted to get the current day and time always the 18 in the team format so that there are no problems in the function
Any solution?