wp-pay-core icon indicating copy to clipboard operation
wp-pay-core copied to clipboard

Accidental styling of card method fields in gateway test meta box

Open rvdsteege opened this issue 11 months ago • 0 comments

The PaymentMethods::CARD payment method results in a bordered box in the gateway test meta box if the method has fields (such as with Mollie, in which case it is showing as an empty box because the field is only supported in WooCommerce):

Scherm­afbeelding 2024-03-22 om 12 13 22

This is caused by the payment method ID card being added as class, for which WordPress applies styling in the admin:

  • https://github.com/WordPress/WordPress/blob/d86d26bd27cc6bee1797fa7b4cd11f62a9d7c42c/wp-admin/css/forms.css#L993-L1005

https://github.com/pronamic/wp-pay-core/blob/c38da296b71c866d16d89b3273ac27bc0aab72e4/views/meta-box-gateway-test.php#L76-L80

rvdsteege avatar Mar 22 '24 12:03 rvdsteege