Tagged: API, woocommerce
Notice: Undefined property: Automattic\WooCommerce\Client::$version in /data01/virt61235/domeenid/www.webme.ee/projects/madis/vollerv2/wp-content/themes/enfold/config-woocommerce/config.php on line 53
I noticed that when running latest Enfold (4.3.1) and using https://github.com/woocommerce/wc-api-php then error above occures when trying to run this:
require __DIR__ . ‘/vendor/autoload.php’;
use Automattic\WooCommerce\Client;
$woocommerce = new Client(
‘http://example.com’,
‘ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX’,
‘cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX’,
[
‘wp_api’ => true,
‘version’ => ‘wc/v2’,
]
);
Hey mehha,
Thank you for using Enfold.
I’m not really sure what’s causing it but the error is pointing to a function which checks for the wocommerce version. Where did you add that code?
Best regards,
Ismael
I made custom template in child theme folder “page-templates”
Br
Madis
Hi,
Do you mind if we take a look at the dashboard? Please provide the login details in the private field. Ask the plugin or API authors for additional help if possible.
Best regards,
Ismael
Problem is not actual anymore. Thank you