pronamic / wp-pay-core

Core components for the WordPress payment processing library. This library is used in the WordPress plugin Pronamic Pay: https://www.pronamicpay.com/, but also allows other plugin developers to set up a payment plugin.
https://www.wp-pay.org/
GNU General Public License v3.0
27 stars 3 forks source link

Trim whitespace while saving values. #87

Closed knit-pay closed 1 year ago

knit-pay commented 1 year ago

Sometimes users add spaces/tabs while copying keys. It will help to fix this issue.

rvdsteege commented 1 year ago

The whitespace could also be intentional for some settings, therefore we won't merge this PR. As an alternatieve, you can remove unintended whitespace at the point where you're actually using the value in your gateway integration. This way, the user input will be saved unaltered and the value can be used without issues.