Known Issues - mairabay/wc-shippo GitHub Wiki

Known Issues

These are issues that we know happen, but they are due to circumstances out of our control. Because they are not caused by this plugin itself, we won't fix them. But we try to provide a workaround as often as possible. If you know of a better workaround or actual solution, feel free to enter an issue in the bug tracker here.

  1. (WCMp only) Duplicate Fields in Edit Shipping Methods dialog box in Vendor Dashboard

Issues

Duplicate Fields in Edit Shipping Methods

For WCMp stores only.

Problem

There is a small chance you might see two or more of each field in the Edit Shipping Methods dialog box in the Vendor Dashboard.

So far this has only happened when installing a new version of the plugin (with a different name) while having the older version still installed on the site. The issue also only happens for the Vendor's shipping zones where our older plugin was already added as a shipping method. If a new shipping zone is added or the shipping method of our plugin is added to a zone that didn't have the older version, the bug does not happen. Also, very oddly, even after uninstalling the older version of our plugin it still appears in the Shipping Zones page for the Vendor. This clearly means that there is some sort of cache issue with WCMp (see Cause below for more details).

Since this is a very edge case, I haven't really tried to reproduce it. It is very unlikely to happen to you. But just in case, this is what the bug looks like:

Screenshot of the bug

The bottom fields are the ones that work and get saved in the database. When you open the dialog again after saving, data will appear in both fields. Changes will only be saved if made on the bottom fields.

Cause

(for advanced developers only)

This seems to be some sort of caching problem by WCMp. I've tried everything under the sun (ie, stack overflow) and nothing seems to solve it. The action is indeed called only once by WCMp ( do_action( 'wcmp_vendor_shipping_'.$method_id.'_configure_form_fields', $shipping_method, $_POST );) but somehow the hook in my plugin fires twice.

Solution

The workaround for this is to remove the Shipping Zone where you see the bug and add it again. This can be done in the site admin at WooCommerce / Settings / Shipping.