Skip to content

Instantly share code, notes, and snippets.

@SitesByYogi
Created September 22, 2022 17:36
Show Gist options
  • Save SitesByYogi/ee705e72042fcd56b9e7ce3fb3b5c55e to your computer and use it in GitHub Desktop.
Save SitesByYogi/ee705e72042fcd56b9e7ce3fb3b5c55e to your computer and use it in GitHub Desktop.
(SproutBillings) - Card input Workaround
<?php if ( 'false' === get_option( 'si_plaid_ach_only' ) ) : ?>
<div class="row description">
<p><?php esc_html_e( 'Please select from the payment types below. Saving your payment information is secure and makes things easier for the future', 'sprout-invoices' ); ?></p>
</div>
<div class="sa-control-group ">
<span class="label_wrap">
<label for="sa_credit_payment_method"><?php esc_html_e( 'Payment Method', 'sprout-invoices' ); ?></label> <span class="required">*</span>
</span>
<span class="input_wrap">
<span class="sa-form-field sa-form-field-radios sa-form-field-required">
<?php if ( ! empty( $cards ) ) : ?>
<?php foreach ( $cards as $payment_profile_id => $name ) : ?>
<span class="sa-form-field-radio clearfix">
<label for="sa_credit_payment_method_<?php echo esc_attr( $payment_profile_id ); ?>">
<input type="radio" name="sa_credit_payment_method" id="sa_credit_payment_method_<?php echo esc_attr( $payment_profile_id ); ?>" value="<?php echo esc_attr( $payment_profile_id ); ?>">
<?php
printf(
'%2$s <a href="javascript:void(0)" data-ref="%3$s" data-invoice-id="%5$s" class="cim_delete_card" title="%4$s"><span class="dashicons dashicons-trash"></span></a>',
esc_html__( 'Previously used', 'sprout-invoices' ),
esc_html( $name ),
esc_html( $payment_profile_id ),
esc_html__( 'Remove this CC from your account.', 'sprout-invoices' ),
(int) $invoice_id
)
?>
</label>
</span>
<?php endforeach ?>
<?php endif ?>
<span class="sa-form-field-radio clearfix">
<label for="sa_credit_payment_method_credit">
<input type="radio" name="sa_credit_payment_method" id="sa_credit_payment_method_credit" value="new_credit"><b><?php esc_html_e( 'New Credit/Debit Card', 'sprout-invoices' ); ?></b></label>
</span>
</span>
</span>
</div>
<?php endif ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment