Title: Check for xmlrpc.inc before loading
Last modified: August 21, 2016

---

# Check for xmlrpc.inc before loading

 *  [Jacob Allred](https://wordpress.org/support/users/zulugrid/)
 * (@zulugrid)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/check-for-xmlrpcinc-before-loading/)
 * Can you update the plugin to check if xmlrpc.inc has already been loaded before
   doing the include? I’m getting a fatal error because I have other plugins that
   use the API that are loaded before this one.
 * A simple fix would be to update isdk.php to check for xmlrpc.inc functions/classes
   before loading. Something like this should work:
 *     ```
       if(!function_exists('xmlrpc_encode_entitites') && !class_exists('xmlrpcresp')) {
           include("xmlrpc-3.0/lib/xmlrpc.inc");
       }
       ```
   
 * [https://wordpress.org/plugins/infusionsoft-web-tracker/](https://wordpress.org/plugins/infusionsoft-web-tracker/)

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

 *  Plugin Author [jordan.hatch](https://wordpress.org/support/users/jordanhatch-1/)
 * (@jordanhatch-1)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/check-for-xmlrpcinc-before-loading/#post-4808447)
 * Jacob,
 * I changed it to use require_once instead of include. I believe it will do the
   same thing. If not let me know and I can update it.
 * Thanks,
 * Jordan
 *  Thread Starter [Jacob Allred](https://wordpress.org/support/users/zulugrid/)
 * (@zulugrid)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/check-for-xmlrpcinc-before-loading/#post-4808448)
 * I don’t think require_once will fix the issue, because each plugin that uses 
   xmlrpc.inc has its own copy of the file. PHP sees each of these as separate files
   so require_once will allow each of them to be loaded.
 * Checking for functions/classes loaded by xmlrpc.inc is the only reliable way 
   I know of to make sure it isn’t loaded twice.
 * Thanks!
 *  Plugin Author [jordan.hatch](https://wordpress.org/support/users/jordanhatch-1/)
 * (@jordanhatch-1)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/check-for-xmlrpcinc-before-loading/#post-4808449)
 * I just did another update to the code to address this. Let me know if you are
   still having a problem.
 * Thanks,
 * Jordan

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

The topic ‘Check for xmlrpc.inc before loading’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/infusionsoft-web-tracker.svg)
 * [Infusionsoft Analytics for WordPress](https://wordpress.org/plugins/infusionsoft-web-tracker/)
 * [Support Threads](https://wordpress.org/support/plugin/infusionsoft-web-tracker/)
 * [Active Topics](https://wordpress.org/support/plugin/infusionsoft-web-tracker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/infusionsoft-web-tracker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/infusionsoft-web-tracker/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [jordan.hatch](https://wordpress.org/support/users/jordanhatch-1/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/check-for-xmlrpcinc-before-loading/#post-4808449)
 * Status: not resolved