Created
October 31, 2017 07:19
-
-
Save andrewlimaza/48c400b1e6e2da0a00c20e90a4457a37 to your computer and use it in GitHub Desktop.
Add stripe as a checkout option with PMPro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function my_pmpro_valid_gateways( $gateways ) { | |
| $gateways[] = "stripe"; | |
| return $gateways; | |
| } | |
| add_filter( "pmpro_valid_gateways", "my_pmpro_valid_gateways" ); | |
| function my_pmpro_checkout_boxes() { | |
| ?> | |
| <a href="?level=<?php echo intval($_REQUEST['level']);?>&gateway=stripe">Checkout with Stripe</a> | |
| <?php | |
| } | |
| add_action( "pmpro_checkout_boxes", "my_pmpro_checkout_boxes" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment