Woocommerce add payment method outside of checkout and my account

It turns out that payment token handling is not standardized across payment gateways in WooCommerce. I ended up having to use a bunch of conditional logic to deal with differences in the way gateways handle the add_pament_method function. Not ideal, but I’m not anticipating needing to support more than a couple gateways, so it’s tolerable.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)