Response Error: Bad Request | WordPress.org

[ad_1]

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.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer