Dears,
Up to now, you might encounter issues if you're using in parallel both bpost and Polylang plugin for Woocommerce.
Please find hereafter the workaround to make it compatible. The official fix will be soon develop in the plugin ...
4 files in the plugin have to be modified:
wp-content/plugins/bpost-shipping/classes/label/class-wc-bpost-shipping-label-url-generator.php à la ligne 39
Replace:
$api_url = $this->woocommerce->api_request_url( 'page-label?' . $query );
by :
$api_url = str_replace(home_url(), home_url('en'), $this->woocommerce->api_request_url( 'page-label?' . $query ));
wp-content/plugins/bpost-shipping/classes/assets/class-wc-bpost-shipping-assets-management.php line 40
Replace:
'url' => WC->api_request_url( 'shm-loader' ),
by:
'url' => str_replace(home_url(), home_url('en'), WC->api_request_url( 'shm-loader' )),
wp-content/plugins/bpost-shipping/classes/class-wc-bpost-shipping-data-builder.php line 57
Replace:
$callback_url = WC->api_request_url( 'shm-callback' );
by:
$callback_url = str_replace(home_url(), home_url('en'), WC->api_request_url( 'shm-callback' ));
wp-content/plugins/bpost-shipping/classes/class-wc-bpost-shipping-admin-order-data-controller.php line 77
Replace:
$api_url = WC->api_request_url( 'bpost-refresh-status?' . $query );
by:
$api_url = str_replace(home_url(), home_url('en'), WC->api_request_url( 'bpost-refresh-status?' . $query ));