woocommerce / woocommerce-subscriptions-custom-price-string

Customize the price displayed to your customers for subscription products (or non-subscription product).
GNU General Public License v3.0
62 stars 11 forks source link

Custom price string stays empty if edited for Variable products #12

Closed treibalen closed 3 years ago

treibalen commented 4 years ago

How to reproduce

  1. Create a variable product and see that the default Custom price string is empty and shows the default value on the front-end:

https://d.pr/i/19Klea Full Size: https://d.pr/i/19Klea

https://d.pr/i/ikP9jw Full Size: https://d.pr/i/ikP9jw

  1. Edit the default Custom price string to anything, the custom string replaces variation prices and doesn't show them at all now:

https://d.pr/i/6jNZbT Full Size: https://d.pr/i/6jNZbT

https://d.pr/i/5mg4NQ Full Size: https://d.pr/i/5mg4NQ

  1. Now empty the string back, it removes the default price from the product's page at all:

https://d.pr/i/sZ13K7 Full Size: https://d.pr/i/sZ13K7

https://d.pr/i/xIhNs0 Full Size: https://d.pr/i/xIhNs0

Now it doesn't even show the price if the variation is chosen:

https://d.pr/i/w1akZ1 Full Size: https://d.pr/i/w1akZ1

https://d.pr/i/lGVvix Full Size: https://d.pr/i/lGVvix

Workaround

The only workaround I found is to completely remove these two meta_id:

https://d.pr/i/cpuWqa Full Size: https://d.pr/i/cpuWqa

SevenAcreFarm commented 4 years ago

We are having the same/similar issue with variable products. We may or may not get the price listed on the catalog page, or the product page, but if edited then the price is just blank on both.

It appears as though the workaround above is valid... Every time you save a custom price on a variable product it creates duplicate database entries for that post_id, removing the "NULL" entry solves the problem.

It also seems to automatically add "/ month" to whatever you type in leaving you to work around that string.

Screen Shot 2020-04-17 at 10 04 29 AM

[ Full Size: https://i.imgur.com/atE8WPF.png ]

bernattorras commented 3 years ago

I can't replicate this issue. When I delete the contents of the "custom from string" field, the default from string is displayed as a placeholder and as the product from string in the Frontend.

If you're still able to replicate this issue with the latest version of the plugin, please leave a comment and we'll continue our investigation from here!

Thanks!