Two problems with conditional checkout fields
-
I think I found 2 bugs when using wc-donation in combination with conditional checkout fields.
I’m using the plugin “Checkout Field Editor and Manager for WooCommerce – Pro” by Acowebs to make conditional checkout fields, but noticed the same behavior with other plugins (https://ww.wp.xz.cn/plugins/woocommerce-checkout-manager/).
I have 2 products, 1 simple subscription and 1 variable subscription. I want to hide some fields for the variable subscription so that I get 2 different checkout experiences.
Simple subscription (Vriend):

Variable subscription (Donatie):

The first problem I encountered is that wc-donation does something with the checkout fields (I am using the WooCommerce classic checkout) by which the logic for show and hide is mixed.
So every time I have to declare the opposite of what I want to accomplish. I.e. instead of Hide choose Show, instead of the intended variable subscription choose the simple subscription, use “Is in” instead of “Is not in” etc. The condition in the picture below states “Hide the address field if the product is in Vriend (simple subscription)”, but what it does is that it hides the address field in the product Donatie (variable subscription).
To exclude that the problem is within the subscription plugin (I use “WooCommerce Subscriptions” by WooCommerce) I did the same tests with simple products. But the same result.
To exclude that the problem is within the checkout field editor, I opened the products directly with the product short code ([products ids=”1693″]) and not the wc-donation short code ([wcdp_donation_form id=”1693″ style=”3″]). When using the product directly the checkout fields work as expected, so no swapped logic.
This is also true when using the store instead of the donation forms. So if I choose a subscription from the store the conditional fields work as intended.

The second problem I encountered is that on first load of variable donation page, the conditional checkout fields are not applied and all fields are showing. Refreshing the page doesn’t change that and also emptying the cart and going back to the donation page doesn’t trigger the conditionality of the checkout fields. However if you first select the simple subscription and then go to the variable subscription, the conditional checkout fields do work. See this video ( https://streamable.com/j8c1rq ) which shows the problem.
I contacted the developer of the checkout field manager plugin, but for this problem the same rule applies. When opening the subscriptions directly from the store, the conditional checkout fields work as designed. So the problem must be somewhere in the way that wc-donation handles the presentation of the checkout fields.
Plugins used:
- Donation Platform for WooCommerce: Crowdfunding & Donatie Management by Jonas Höbenreich version 1.3.3
- Checkout Field Editor and Manager for WooCommerce – Pro by Acowebs version 4.1.0
- Loco Translate by Tim Whitlock version 2.6.14
- WooCommerce by WooCommerce version 9.4.2
- WooCommerce Subscriptions by WooCommerce version 6.9.0
The page I need help with: [log in to see the link]
The topic ‘Two problems with conditional checkout fields’ is closed to new replies.