我有一个运行WooCommerce的Wordpress网站,我正在使用一个名为XERO的插件来开我的发票,每当我尝试通过Wordpress向XERO发送发票后,网站就会抛出错误:
致命错误:第213行/home/vipcomau/public_html/wp-content/plugins/woocommerce-xero/classes/requests/class-wc-xr-request.php中找不到“WC_XR_OAuthSimple”类
以下是此错误引用的代码片段:
private function get_signed_url() {
if ( null === $this->signed_url ) {
// Setup OAuth object
$oauthObject = new WC_XR_OAuthSimple();
// Reset, start clean
$oauthObject->reset();
// Settings object
$settings = new WC_XR_Settings();
// Do the OAuth sign request
$oauth_result = $oauthObject->sign( array(
'path' => self::API_URL . $this->get_endpoint() . '/',
'action' => 'PUT',
'parameters' => array(
'oauth_signature_method' => 'RSA-SHA1'
),
'signatures' => array(
'consumer_key' => $settings->get_option( 'consumer_key' ),
'shared_secret' => $settings->get_option( 'consumer_secret' ),
'rsa_private_key' => $settings->get_option( 'private_key' ),
'rsa_public_key' => $settings->get_option( 'public_key' ),
'oauth_secret' => $settings->get_option( 'consumer_secret' ),
'oauth_token' => $settings->get_option( 'consumer_key' )
)
) );
// Set the signed URL
$this->signed_url = $oauth_result['signed_url'];
}
return $this->signed_url;
}
我真的很挣扎,因为我不是PHP开发人员,而是为客户设置网站。