Mark-Tomlinson / markup-by-attribute-for-woocommerce

Price markup by attribute term for WooCommerce
GNU General Public License v3.0
3 stars 3 forks source link

The old markup is shown on the options drop-down box after it has been changed #25

Closed monsterbnd closed 5 months ago

monsterbnd commented 2 years ago

After changing the markup to a new value, the old markup is displayed in the attribute name on the product page. First changing the markup works fine. The error occurs on the second markup change. The price is correct. The output block of the base price and markup is also normal.

monsterbnd commented 2 years ago

I figured out what's wrong. After changing the markup, I go to the product, variations, set regular price, save the product. The last step (save) is the problem. If you do not save the product, then everything is fine.

Mark-Tomlinson commented 2 years ago

I see. I was trying to recreate the problem, and wasn't able to until I read your second message.

This is an interesting issue, and I'm surprised it hasn't come up earlier. For now, you know how to avoid the issue. Meanwhile, I will see if I can find the issue in the code and resolve it.

Thanks for your patience.

Mark-Tomlinson commented 5 months ago

It's been two years, but the problem is now resolved.

I still don't know the cause of the issue, but I had completely restructured the code that performs the update, and rolled out the new code after testing with the latest versions of WordPress and WooCommerce. So, one of us resolved the issue ... but I don't know who.

You can test to ensure the problem is resolved by,

  1. Change the markup on an attribute.
  2. [Set regular prices] on the product.
  3. And then click [Update] on that product.

What you should see is that the price remains at what you set it to, and does not revert to the price before you changed it. I highly suspect that this was a problem within WooCommerce.