Title: Deprecated function used
Last modified: September 1, 2016

---

# Deprecated function used

 *  [Josh Kohlbach](https://wordpress.org/support/users/jkohlbach/)
 * (@jkohlbach)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/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.
 * Cheers,
    Josh
 * [https://wordpress.org/plugins/hookpress/](https://wordpress.org/plugins/hookpress/)

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

 *  [ruess](https://wordpress.org/support/users/ruess/)
 * (@ruess)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-7567687)
 * 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))
       ```
   
 * to
 *     ```
       if (preg_match('/[A-Z]+/i', $arg))
       ```
   
 *  [SeedProd](https://wordpress.org/support/users/seedprod/)
 * (@seedprod)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-8353275)
 * Also replace line 100 in includes.php with the same thing.
 *  [SeedProd](https://wordpress.org/support/users/seedprod/)
 * (@seedprod)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-8353314)
 * One other thing you’ll need to replace line 60 in services.php
 * Change
 * ‘fields’=>split(‘,’,$_POST[‘fields’]),
 * to
 * ‘fields’=>explode(‘,’,$_POST[‘fields’]),
    -  This reply was modified 9 years, 7 months ago by [SeedProd](https://wordpress.org/support/users/seedprod/).
    -  This reply was modified 9 years, 7 months ago by [SeedProd](https://wordpress.org/support/users/seedprod/).
 *  [frankwarwick](https://wordpress.org/support/users/frankwarwick/)
 * (@frankwarwick)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-9275874)
 * Hi, Added these changes with the current WP version 4.8 and PHP7 but the fields
   are not saved
 *  [willemdumee](https://wordpress.org/support/users/willemdumee/)
 * (@willemdumee)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-9277223)
 * Hi Frank,
 * You have to change
    ‘fields’=>split(‘,’,$_POST[‘fields’]), to fields’=>explode(‘,’,
   $_POST[‘fields’]),
 * within both $edithook and $newhook array. Along with the edit of [@ruess](https://wordpress.org/support/users/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.
 *  [frankwarwick](https://wordpress.org/support/users/frankwarwick/)
 * (@frankwarwick)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-9286093)
 * Hi [@willemdumee](https://wordpress.org/support/users/willemdumee/)
    Thanks, 
   Just to confirm for myself and others that this is your fork that works with 
   PHP7 – [https://github.com/Willemdumee/hookpress](https://github.com/Willemdumee/hookpress)
 *  [frankwarwick](https://wordpress.org/support/users/frankwarwick/)
 * (@frankwarwick)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-9286102)
 * [@willemdumee](https://wordpress.org/support/users/willemdumee/) FYI – thanks,
   your fork works well
 *  [willemdumee](https://wordpress.org/support/users/willemdumee/)
 * (@willemdumee)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-9300705)
 * [@frankwarwick](https://wordpress.org/support/users/frankwarwick/) your welcome
 *  [rubinwad](https://wordpress.org/support/users/rubinwad/)
 * (@rubinwad)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-9541890)
 * Hi,
    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.
   Thanks.

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

The topic ‘Deprecated function used’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/hookpress_d3e7f8.svg)
 * [HookPress](https://wordpress.org/plugins/hookpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hookpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hookpress/)
 * [Active Topics](https://wordpress.org/support/plugin/hookpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hookpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hookpress/reviews/)

 * 9 replies
 * 6 participants
 * Last reply from: [rubinwad](https://wordpress.org/support/users/rubinwad/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-used/#post-9541890)
 * Status: not resolved