Add styles to fields

This commit is contained in:
Emili Castells Guasch 2023-11-15 16:18:39 +01:00
parent 8fc4833503
commit 5112e75552
2 changed files with 1 additions and 2 deletions

View file

@ -281,7 +281,6 @@ class CreditCardRenderer {
const stylesRaw = window.getComputedStyle(field);
const styles = {};
Object.values(stylesRaw).forEach((prop) => {
console.log(prop)
if (!stylesRaw[prop] || !allowedProperties.includes(prop)) {
return;
}

View file

@ -64,7 +64,7 @@ class CardFieldsModule implements ModuleInterface {
function( $default_fields, $id ) {
if ( CreditCardGateway::ID === $id && apply_filters( 'woocommerce_paypal_payments_enable_cardholder_name_field', false ) ) {
$default_fields['card-name-field'] = '<p class="form-row form-row-wide">
<label for="ppcp-credit-card-gateway-card-name">Card Name</label>
<label for="ppcp-credit-card-gateway-card-name">' . esc_attr__( 'Cardholder Name', 'woocommerce-paypal-payments' ) . '</label>
<input id="ppcp-credit-card-gateway-card-name" class="input-text wc-credit-card-form-card-expiry" type="text" placeholder="' . esc_attr__( 'Cardholder Name (optional)', 'woocommerce-paypal-payments' ) . '" name="ppcp-credit-card-gateway-card-name">
</p>';