• Resolved psorn

    (@psorn)


    Hi there,

    Currently, it is not possible to create labels (Response Error: Bad Request). No changes to yesterday. Is this a plugin or API error?

    Please advise, thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @psorn

    The Issue:
    We were facing the same issue, the issue was nonce was not verifying correctly resulting in error “Bad Request”

    The Fix:

    In this file “wp-content/plugins/dhl-for-woocommerce/assets/js/pr-dhl.js” on line 299

    Change this

            var data = {
                action:                   'wc_shipment_dhl_gen_label',
                order_id:                 woocommerce_admin_meta_boxes.post_id,
            };

    With this

            var data = {
                action:                   'wc_shipment_dhl_gen_label',
                order_id:                 woocommerce_admin_meta_boxes.post_id,
                pr_dhl_label_nonce:       $( '#pr_dhl_label_nonce' ).val()
            };
    Thread Starter psorn

    (@psorn)

    @wpcentric Thank you!

    Currently, it seems to work again but good to know.

    unfortunately the fix doesn’t work for me, do you have any other ideas?

    @jannisbrandt

    Undo the previously suggested changes, if they are not working for you and try following instead:

    In this file “wp-content/plugins/dhl-for-woocommerce/includes/abstract-pr-dhl-wc-order.php” at line 298

    Change this:
    check_ajax_referer( 'create-dhl-label', 'pr_dhl_label_nonce' );
    With this:
    //check_ajax_referer( 'create-dhl-label', 'pr_dhl_label_nonce' );

    • This reply was modified 6 months, 3 weeks ago by Edris Ibrahim.
    Plugin Author Abdalsalaam Halawa

    (@abdalsalaam)

    Hello @psorn, @jannisbrandt
    since its back to work with you it seems it was API’s outage but can you send the plugin logs to our support email so we can check what is going wrong?

    @wpcentric I don’t recommend to disable the ajax referer check,
    thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Response Error: Bad Request’ is closed to new replies.