• I am working on a plugin that allows for insertion of links to the wordpress database.

    When I explicitly run the plugin from inside my admin panel it runs successfully no problem. However, when running the plugin via scheduled_events it fails and I get the following error:

    PHP Fatal error: Call to undefined function wp_insert_link()

    The scheduled_events are running no problem when they should (hourly), so I know that action was set up successfully.

    Code fails on this line:

    $link_id	= wp_insert_link( $linkdata );  //insert or update our link

    Want to note that the scheduled event is calling the same function that is called from my action in the admin panel.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Call to undefined function wp_insert_link() When Using wp_schedule_event’ is closed to new replies.