Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @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?

    Workaround includes/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();

    Thread Starter gamecreature

    (@gamecreature)

    @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.
    Thread Starter gamecreature

    (@gamecreature)

    A 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, the Woo_Variation_Swatches_Backend::get_group is being called for the new extra REST api info. But this method doesn’t exist in the Woo_Variation_Swatches_Backend class.

    I grepped the complete folder and get_group isn’t defined!

    Is it possible this method only exists in the pro/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.
    Thread Starter gamecreature

    (@gamecreature)

    It’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 the error.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.
Viewing 4 replies - 1 through 4 (of 4 total)