Skip to content

Commit

Permalink
Use div for card element wrappers instead of span
Browse files Browse the repository at this point in the history
  • Loading branch information
takayukister committed Aug 24, 2021
1 parent 0afd6f7 commit 376f704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/stripe/stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ function wpcf7_add_form_tag_stripe() {

function wpcf7_stripe_form_tag_handler( $tag ) {
$card_element = sprintf(
'<span %s></span>',
'<div %s></div>',
wpcf7_format_atts( array(
'class' => 'card-element wpcf7-form-control',
'aria-invalid' => 'false',
) )
);

$card_element = sprintf(
'<span class="wpcf7-form-control-wrap hidden">%s</span>',
'<div class="wpcf7-form-control-wrap hidden">%s</div>',
$card_element
);

Expand Down
4 changes: 4 additions & 0 deletions modules/stripe/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.wpcf7 .wpcf7-stripe .wpcf7-form-control-wrap {
margin: .6em 0;
}

.wpcf7 .wpcf7-stripe .wpcf7-form-control {
display: block;
background: #f6f7f7;
Expand Down

0 comments on commit 376f704

Please sign in to comment.