Skip to content

Commit

Permalink
Update stripe.php
Browse files Browse the repository at this point in the history
  • Loading branch information
takayukister committed Aug 24, 2021
1 parent 376f704 commit fcbc201
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions modules/stripe/stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
10, 0
);

/**
* Registers the Stripe service.
*/
function wpcf7_stripe_register_service() {
$integration = WPCF7_Integration::get_instance();

Expand All @@ -29,6 +32,9 @@ function wpcf7_stripe_register_service() {
10, 0
);

/**
* Enqueues scripts and styles for the Stripe module.
*/
function wpcf7_stripe_enqueue_scripts() {
$service = WPCF7_Stripe::get_instance();

Expand Down Expand Up @@ -89,6 +95,11 @@ function wpcf7_stripe_enqueue_scripts() {
10, 2
);

/**
* Skips the spam check if it is not necessary.
*
* @return bool True if the spam check is not necessary.
*/
function wpcf7_stripe_skip_spam_check( $skip_spam_check, $submission ) {
$service = WPCF7_Stripe::get_instance();

Expand Down Expand Up @@ -121,6 +132,9 @@ function wpcf7_stripe_skip_spam_check( $skip_spam_check, $submission ) {
10, 3
);

/**
* Creates Stripe's Payment Intent.
*/
function wpcf7_stripe_before_send_mail( $contact_form, &$abort, $submission ) {
$service = WPCF7_Stripe::get_instance();

Expand Down Expand Up @@ -182,6 +196,9 @@ function wpcf7_stripe_before_send_mail( $contact_form, &$abort, $submission ) {
10, 4
);

/**
* Registers the [_stripe_payment_link] special mail-tag.
*/
function wpcf7_stripe_smt( $output, $tag_name, $html, $mail_tag ) {
if ( '_stripe_payment_link' === $tag_name ) {
$submission = WPCF7_Submission::get_instance();
Expand All @@ -204,6 +221,9 @@ function wpcf7_stripe_smt( $output, $tag_name, $html, $mail_tag ) {
10, 0
);

/**
* Registers the stripe form-tag handler.
*/
function wpcf7_add_form_tag_stripe() {
wpcf7_add_form_tag(
'stripe',
Expand All @@ -215,6 +235,11 @@ function wpcf7_add_form_tag_stripe() {
}


/**
* Defines the stripe form-tag handler.
*
* @return string HTML content that replaces a stripe form-tag.
*/
function wpcf7_stripe_form_tag_handler( $tag ) {
$card_element = sprintf(
'<div %s></div>',
Expand Down

0 comments on commit fcbc201

Please sign in to comment.