-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Environment
Plugin Version: 5.13.1
WooCommerce Version: 10.0.2
Problem Description
The payment plan table fails to display when selecting an installment payment option in the checkout process.
Steps to Reproduce
- Go to WooCommerce checkout page
- Select Alma payment method with installments
- Check an installment option
- Expected: Payment plan table should appear
Actual: Nothing happens, table remains hidden
Comparison with Working Version
Version 2.0.0 of the plugin doesn't have this issue and works correctly.
Here's the code comparison between the working version 2.0.0 (left, in red) and the current broken version 5.13.1 (right, in green):

Root Cause Analysis
The key difference is the addition of .closest('li.wc_payment_method').find() in the current version. Since no <li> elements with class wc_payment_method exist in the DOM, this selector chain fails and the payment plan table never gets displayed.
The issue is located in this code line
| onchange="if (this.checked) { jQuery( '<?php echo esc_js( $plan_class ); ?>' ).hide(); jQuery(this).closest('li.wc_payment_method').find( '<?php echo esc_js( $plan_id ); ?>' ).show() }" |
The direct element selection used in version 2.0.0 worked perfectly and should be restored.
jQuery('#alma-payment-plan-table-general_X_0_0-installments').show()