I'm working on a payment gateway plugin for WooCommerce and I need to edit the checkout form. When the user has selected 'Sweden' as their country, and they selected 'Klarna' as their payment method, an extra input field should appear for the user's social security number (this is totally normal in Sweden, really).
As far as I understand, the woocommerce_checkout_update_order_review
action gets triggered when something changes in the checkout form. I believe I can use the woocommerce_get_country_locale
filter to add the social security number field for Swedish customers. So, inside my woocommerce_checkout_update_order_review
hook, I want to trigger the woocommerce_get_country_locale
filter. How is this done?
Thanks in advance.