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' );
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