-
Notifications
You must be signed in to change notification settings - Fork 9
Adds group by country in advance settings #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b84d369 to
466832b
Compare
|
|
||
| var updateFields = function(){ | ||
| var modes = modesField.val(); | ||
| var brazil_val = countryPayments.brazil.val(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In JS, we are using camelCase to variables and methods names.
| for (var i in modes) { | ||
| enableFields(fields.filter('.' + modes[i])); | ||
| } | ||
| if (modes.length == 2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 2? Is there a automatically way to do this? It's dangerous put this in hard code haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's two because when CPF and CNPJ are both selected the field "Entity Type Selector" is added.
| 'title' => __('RUT', 'woocommerce-gateway-ebanx'), | ||
| 'type' => 'text', | ||
| 'class' => 'ebanx-advanced-option ebanx-checkout-manager-field always-visible', | ||
| 'class' => 'ebanx-advanced-option ebanx-checkout-manager-field chile', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the class to something like ebanx-chile-document? Because chile is so generic and can cause troubles with another plugins, etc.
| 'title' => __('Brazil', 'woocommerce-gateway-ebanx'), | ||
| 'type' => 'multiselect', | ||
| 'class' => 'ebanx-select', | ||
| 'class' => 'ebanx-select payment-method', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the class to ebanx-payment-method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We realize that it was not being used so we just removed it.
|
@gpressutto5 Yes, I agree. Because we may need to add the Colombia fields, because Colombia has the DNI and the flow will be the same. @gabrielysimette hold this PR. |
|
@gabrielysimette we merged the |
…into feature/checkout-options-by-country
|
@gpressutto5 will test your branch and if all is ok, you can merge, just wait his approval. |
|
@gabrielysimette can you solve the @gpressutto5 request? |
…ll checkout manager fields would disappear


Closes #307