Checking success for a function that can return wp_error

  $Result = wp_schedule_event( ##### );
  if (is_wp_error($Result))
    echo "wp_schedule_event error: " . $Result->get_error_message();
  else if ($Result === True)
    echo "wp_schedule_event success";
  else
    echo "wp_schedule_event something unknown went wrong";
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *