price was called incorrectly . Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, call_user_func, WC_REST_CRUD_Controller->get_items, WC_REST_Products_Controller->prepare_object_for_response, WC_REST_Products_Controller->get_product_data, WC_Product->get_price_html, apply_filters('woocommerce_get_price_html'), WP_Hook->apply_filters, call_user_func_array, road_woo_price_html, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see
Debugging in WordPress for more information. (This message was added in version 3.0.) in on line
This kind of error normally comes when woocommerce got updated to 3.0 where we cannot access product or object properties in array format but in object format . Till date woocommerce client was working fine suddenly this error started are coming.
If you updated WooCommerce and stared to have this problem you should fix on your WooCommerce installation, so is not an issue with this REST API wrapper.
Below is the sample of the error
price was called incorrectly . Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, call_user_func, WC_REST_CRUD_Controller->get_items, WC_REST_Products_Controller->prepare_object_for_response, WC_REST_Products_Controller->get_product_data, WC_Product->get_price_html, apply_filters('woocommerce_get_price_html'), WP_Hook->apply_filters, call_user_func_array, road_woo_price_html, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong Please see Debugging in WordPress for more information. (This message was added in version 3.0.) in on line
This kind of error normally comes when woocommerce got updated to 3.0 where we cannot access product or object properties in array format but in object format . Till date woocommerce client was working fine suddenly this error started are coming.
I am using 1.2 woocommerce php client .
Please let me know where i am wrong.