gamecreature
Forum Replies Created
-
Forum: Plugins
In reply to: [MyParcel] Call to a member function get_data() on boolHi @barthusz same problem here. When I look in the code the issue is caused if the product doesn’t exist anymore.
MyParcel, would you please validate if the product exists before invoking a method on the product?
Workaroundincludes/admin/class-wcmp-export-consignments.php
: 352$data = $item ->get_product() ->get_data();
To$product = $item->get_product(); if(!$product) continue; $data = $product->get_data();
Forum: Plugins
In reply to: [Variation Swatches for WooCommerce] REST error since version 2.021@fizanzvai I just installed the update. And I can confirm, the problem has been solved! Thanks!! ??
- This reply was modified 1 year, 9 months ago by gamecreature.
Forum: Plugins
In reply to: [Variation Swatches for WooCommerce] REST error since version 2.021A screen-recording is pretty useless, I’m just invoking an API call via the command line . Posting a screencast would also expose my api-secrets in this Forum.
The thing that goes wrong is this, theWoo_Variation_Swatches_Backend
::get_group
is being called for the new extra REST api info. But this method doesn’t exist in theWoo_Variation_Swatches_Backend
class.
I grepped the complete folder and get_group isn’t defined!
Is it possible this method only exists in thepro/paid
version?
And accidentally the pro-method call is added to the free version?- This reply was modified 1 year, 9 months ago by gamecreature.
- This reply was modified 1 year, 9 months ago by gamecreature.
Forum: Plugins
In reply to: [Variation Swatches for WooCommerce] REST error since version 2.021It’s a bit difficult to make a screen cast of this. Invoking the API fails.
Below is an example for the curl command to fetch the terms of a product attribute. Which fails since this version.
(the PHP error details posted above are from theerror.log
file)curl https://www.example.com/wp-json/wc/v3/products/attributes/1/terms \ --header "Accept: application/json" \ --header "Authorization: secret" {"code":"internal_server_error","message":" Er heeft zich een kritieke fout voorgedaan op deze site.<\/p> Meer informatie over probleemoplossing in WordPress.<\/a><\/p>","data":{"status":500},"additional_errors":[]}
When I disable the
get_callback
the response is as expected (and as it was before)curl https://www.example.com/wp-json/wc/v3/products/attributes/1/terms \ --header "Accept: application/json" \ --header "Authorization: secret" [{"id":157,"name":"Adidas","slug":"adidas","description":"","menu_order":0,"count":50,"_links":{"self":[{"href":"https://www.example.com/wp-json/wc/v3/products/attributes/1/terms/157"}],"collection":[{"href":"https://www.example.com/wp-json/wc/v3/products/attributes/1/terms"}]}},{"id":211,"name":"Asics","slug":"asics","description":"","menu_order":0,"count":63,"_links":{"self":[{"href":"https://www.example.com/wp-json/wc/v3/products/attributes/1/terms/211"}],"collection":[{"href":"https://www.example.com/wp-json/wc/v3/products/attributes/1/terms"}]}}]
- This reply was modified 1 year, 9 months ago by gamecreature.
- This reply was modified 1 year, 9 months ago by gamecreature.