WordPress can’t find IXR_Client

Trying:

$client = new IXR_Client('http://othersite.com/xmlrpc.php');

I get the error

Read More

Fatal error: Class ‘IXR_Client’ not found in footer.php

I can see the class in wp-includes/class-IXR.php, and I’ve checked that the path to this file is correct in wp-includes/functions.php as per this discussion.

Am I missing something needed to use this class in my custom theme’s footer?

Related posts

Leave a Reply

1 comment

  1. You mean class-IRC.php or class-IXR.php?

    Just include the files before you call IXR_Client. I use such code to call IXR_CLIENT and it worked on my site:

    include_once( ABSPATH . WPINC . '/class-IXR.php' );
    include_once( ABSPATH . WPINC . '/class-wp-http-ixr-client.php' );
    
    $client = new WP_HTTP_IXR_CLIENT( 'http://othersite.com/xmlrpc.php' );