Name of the Action or Filter hook followed by the arguments available for that hook.

Actions :

  • ‘direct_stripe_before_button’ => Triggered before each button
    1 $button_id
  • ‘direct_stripe_after_button’ => Triggered after each button
    1 $button_id
  • ‘direct_stripe_after_form’ => triggered after each button
  • direct_stripe_before_success_redirection‘ => Triggered after a successful transaction
    1.$chargeID, 2.$post_id, 3.$button_id, 4.$user_id
  • ‘direct_stripe_before_error_redirection’ => Triggered after a transaction fails
    1.$chargeID, 2.$post_id, 3.$button_id, 4.$user_id

 

Filters :

  • ‘direct_stripe_div_before’,  => Edit parent element of the button
     1.$str_before, 2.$button_id, 3.$ds_class => ID set in the button settings page
  • ‘direct_stripe_donation_input’ => Edit donation input markup
    1.$html => <input type="number" name="donationvalue" id="donationvalue" />, 2 $instance => generated on page load, $button_id => ID set in the button settings page
    
  • ‘direct_stripe_button_class’ => Edit button classes
    1.$classes, 2. $button_id => ID set in the button settings page, 3. $instance => generated on page load
  • ‘direct_stripe_button’  => Edit Button markup ( Example Gist )
        1.$button, 2.$instance => generated on page load, 3.$button_id => ID set in the button settings page, 4.$ds_button_class
  • ‘direct_stripe_div_after’  => Edit closing tag of parent element
        1.$button_id
  • ‘direct_stripe_processing_transaction_spinner’ => Edit Ajax spinner
    1.$all the html, 2.$begin, 3.$end, 4.$text, 5.$dots
  • ‘direct_stripe_charge_data’
    1.$chargerdata, 2.$user, 3.$token, 4.$amount, 5.$currency, 6.$capture, 7.$description
  • ‘direct_stripe_subscription_data’
    1.$subscriptiondata, 2.$user, 3.$token, 4.$button_id, 5.$plan_id, 6.$coupon, 7.$description
  • ‘direct_stripe_setup_fee_data’
    1.$setupfeedata, 2.$user, 3.$token, 4.$setup_fee, 5.$currency, 6.$description
  • ‘direct_stripe_success_user_email_subject’
    1.$token, 2.$amount, 3.$currency, 4.$email_address, 5.$description, 6.$user_id, 7.$button_id
  • ‘direct_stripe_success_admin_email_subject’
    1.$token, 2.$amount, 3.$currency, 4.$email_address, 5.$description, 6.$user_id, 7.$button_id
  • ‘direct_stripe_error_user_email_subject’
    1.$token, 2.$amount, 3.$currency, 4.$email_address, 5.$description, 6.$user_id, 7.$button_id
  • ‘direct_stripe_error_admin_email_subject’
    1.$token, 2.$amount, 3.$currency, 4.$email_address, 5.$description, 6.$user_id, 7.$button_id
  • ‘direct_stripe_success_user_email_content’
    1.$token, 2.$amount, 3.$currency, 4.$email_address, 5.$description, 6.$user_id, 7.$button_id
  • ‘direct_stripe_success_admin_email_content’
    1.$token, 2.$amount, 3.$currency, 4.$email_address, 5.$description, 6.$user_id, 7.$button_id
  • ‘direct_stripe_error_user_email_content’
    1.$token, 2.$amount, 3.$currency, 4.$email_address, 5.$description, 6.$user_id, 7.$button_id
  • ‘direct_stripe_error_admin_email_content’
    1.$token, 2.$amount, 3.$currency, 4.$email_address, 5.$description, 6.$user_id, 7.$button_id
  • ‘direct_stripe_donation_amount’
    1.$amount

8 thoughts on “Direct Stripe Actions and Filters hooks

  1. Hello great plugin, I am trying to add a TEXT FIELD mobile, so i can push a SMS TEXT MESSAGE on complete, is this possible? or any ideas how i can do this

    Many thnaks Chris

  2. I am using Easy Digital Downloads to sell ebooks.

    How do I direct the buyer to the ebook download page after payment? The plugin Stripe Payments has an input box for the downloadable url but yours does not.

    Thank you.

    1. Hello Julian,

      Sorry for the late reply and thank you for using Direct Stripe.

      Direct Stripe is totally independent from EDD but you could set a redirection to your downloads page after a successful payment. The shortcode takes the success_url argument to set use a redirection after a successfull transaction. ( I will soon update Direct Stripe in order to have a proper settings page to add and manage buttons, that will make it much easier to set ).

      Best regards,

Leave a Reply

Your email address will not be published. Required fields are marked *