supports( 'tokenization' ) && is_checkout() ) { $this->tokenization_script(); $this->saved_payment_methods(); $this->form(); $this->save_payment_method_checkbox(); } else { $this->form(); } } /** * Output field name HTML * * Gateways which support tokenization do not require names - we don't want the data to post to the server. * * @since 2.6.0 * @param string $name Field name. * @return string */ public function field_name( $name ) { return $this->supports( 'tokenization' ) ? '' : ' name="' . esc_attr( $this->id . '-' . $name ) . '" '; } /** * Outputs fields for entering credit card information. * * @since 2.6.0 */ public function form() { wp_enqueue_script( 'wc-credit-card-form' ); $fields = array(); $cvc_field = '
field_name( 'card-cvc' ) . ' style="width:100px" />
'; $default_fields = array( 'card-number-field' => 'field_name( 'card-number' ) . ' />
', 'card-expiry-field' => 'field_name( 'card-expiry' ) . ' />
', ); if ( ! $this->supports( 'credit_card_form_cvc_on_saved_method' ) ) { $default_fields['card-cvc-field'] = $cvc_field; } $fields = wp_parse_args( $fields, apply_filters( 'woocommerce_credit_card_form_fields', $default_fields, $this->id ) ); ?> supports( 'credit_card_form_cvc_on_saved_method' ) ) { echo ''; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped } } }