Title: Programmatic setup error in v2.4.2
Last modified: June 10, 2021

---

# Programmatic setup error in v2.4.2

 *  Resolved [midwestdev](https://wordpress.org/support/users/midwestdev/)
 * (@midwestdev)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/)
 * As of 2.4.2, my ability to programmatically add a scheduled expiration seems 
   to be gone. I updated and once the code ran, I got:
    `PHP Fatal error: Uncaught
   Error: Call to undefined function _scheduleExpiratorEvent()`
 * Once I rolled back the plugin to 2.4.1, it worked as expected and added a predetermined
   expiration to the post being created.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [mtyaad](https://wordpress.org/support/users/mtyaad/)
 * (@mtyaad)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14543443)
 * Hi,
    It happened to me too. I looked at the plugin code. Function name changed
   to `postexpirator_schedule_event`
    -  This reply was modified 4 years, 11 months ago by [mtyaad](https://wordpress.org/support/users/mtyaad/).
 *  Plugin Author [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * (@stevejburge)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14543456)
 * [@mtyaad](https://wordpress.org/support/users/mtyaad/) [@midwestdev](https://wordpress.org/support/users/midwestdev/)
   thanks for reporting this. We’ll fix it in a follow-up release early next week.
 *  Plugin Author [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * (@stevejburge)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14545691)
 * [@mtyaad](https://wordpress.org/support/users/mtyaad/) [@midwestdev](https://wordpress.org/support/users/midwestdev/)
   We’ve had a discussion on our team about this.
 * We think this function name change was a positive move as we work to clean up
   the codebase.
 * We’re prepared to roll back this change if needed, but wanted to ask … are you
   able to update your code for the new function?
 * If you can’t, could you explain your use-case a little? Maybe we can support 
   it and still clean up the codebase.
 *  Thread Starter [midwestdev](https://wordpress.org/support/users/midwestdev/)
 * (@midwestdev)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14546004)
 * [@stevejburge](https://wordpress.org/support/users/stevejburge/) Function name
   changes are pretty common, so I understand, and luckily, I am able to change 
   it in my case.
 * However, that being said, I didn’t do any dives into the code to find what the
   new function name was, there was no notes about it in your changelog, and as 
   far as I can tell, there was no deprecation process to let developers know that
   it was changing, and what it was changing to.
 * Maybe adding a passthrough function with the old function name with a deprecation
   warning and adding something about it in your changelog would be a good first
   step and then drop it when you feel you’ve given enough warning? Just a suggestion.
 *  Plugin Author [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * (@stevejburge)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14546032)
 * thanks [@midwestdev](https://wordpress.org/support/users/midwestdev/). 100% agree
   on the changelog. Sorry, we messed up on this one. We normally do a detailed 
   log with “Added”, “Changed”, and “Fixed”.
 * We are leaning towards leaving this change in place, but adding legacy support
   in the next release.
 *  Thread Starter [midwestdev](https://wordpress.org/support/users/midwestdev/)
 * (@midwestdev)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14546082)
 * [@stevejburge](https://wordpress.org/support/users/stevejburge/) No worries, 
   I’m just glad you’re responsive! Dealt with a lot of un-responded support tickets
   in my day. Love the plugin and keep up the good work!
 *  Plugin Author [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * (@stevejburge)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14546099)
 * Thanks [@midwestdev](https://wordpress.org/support/users/midwestdev/)
 * We took over maintaining the plugin a couple of months ago, and are moving slowly,
   learning more about what existing users are doing with the plugin. This kind 
   of feedback is super-helpful.
 *  Thread Starter [midwestdev](https://wordpress.org/support/users/midwestdev/)
 * (@midwestdev)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14546126)
 * Sure, in case it’s more helpful, one of the uses I have that wasn’t working is
   adding a custom length of time per post created on a Gravity Forms submission.
   The blanket post expiration isn’t what was requested, so I had to resort to setting
   the expiration programmatically after the form is submitted and the post is created.
   Otherwise, I typically use it as an admin tool on most other sites, so that level
   of programming isn’t needed. Hope this information helps.
 *  Plugin Author [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * (@stevejburge)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14546132)
 * [@midwestdev](https://wordpress.org/support/users/midwestdev/) 150% it’s helpful.
   Thanks for sharing that with us.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Programmatic setup error in v2.4.2’ is closed to new replies.

 * ![](https://ps.w.org/post-expirator/assets/icon-256x256.png?rev=3118683)
 * [Schedule Post Changes With PublishPress Future: Unpublish, Delete, Change Status, Trash, Change Categories](https://wordpress.org/plugins/post-expirator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-expirator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-expirator/)
 * [Active Topics](https://wordpress.org/support/plugin/post-expirator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-expirator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-expirator/reviews/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)

 * 9 replies
 * 3 participants
 * Last reply from: [Steve Burge](https://wordpress.org/support/users/stevejburge/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/programmatic-setup-error-in-v2-4-2/#post-14546132)
 * Status: resolved