Support » Plugin: HookPress » Deprecated function used

  • Hi there,

    Great plugin, but looks like you’re using a deprecated function ‘ereg’ in services.php hookpress_ajax_get_fields()

    This function has been deprecated since PHP 5.3.0 and is now removed in PHP7.

    Currently due to this the plugin doesn’t work on PHP7 environments…

    Hope you can fix it on the next release.


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


    Great catch Josh!

    For those who need this to work with PHP 7, I’d recommend replacing line 13 of services.php from

    if (ereg('[A-Z]+',$arg))


    if (preg_match('/[A-Z]+/i', $arg))

    Also replace line 100 in includes.php with the same thing.

    One other thing you’ll need to replace line 60 in services.php





    • This reply was modified 5 years, 9 months ago by SeedProd.
    • This reply was modified 5 years, 9 months ago by SeedProd.

    Hi, Added these changes with the current WP version 4.8 and PHP7 but the fields are not saved

    Hi Frank,

    You have to change

    within both $edithook and $newhook array. Along with the edit of @ruess it should work fine.

    Bye the way: if you google on e.g. my name and HookPress you will find a fork. You can also download this one and use it.

    Hi @willemdumee
    Thanks, Just to confirm for myself and others that this is your fork that works with PHP7 –

    @willemdumee FYI – thanks, your fork works well

    @frankwarwick your welcome

    Is there a way to use HookPress with custom post and field types. I have created a post type with Pods and need to be able to use the custom post type’s fields with Zapier.
    Any help is greatly appreciated. Btw I am not a developer.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Deprecated function used’ is closed to new replies.