Last active
May 10, 2016 15:18
-
-
Save greenhornet79/94dce940b18ba99d4d46c4c171449104 to your computer and use it in GitHub Desktop.
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
| <?php | |
| function leaky_paywall_2checkout_add_signup_link( $payment_options, $level, $level_id ) { | |
| $output = ''; | |
| $settings = get_leaky_paywall_settings(); | |
| $gateways = new Leaky_Paywall_Payment_Gateways(); | |
| $enabled_gateways = $gateways->enabled_gateways; | |
| if ( in_array( '2checkout', array_keys( $enabled_gateways ) ) ) { | |
| $output = '<div class="leaky-paywall-payment-button"><a href="' . get_page_link( $settings['page_for_register'] ) . '?level_id=' . $level_id . '">Subscribe</a></div>'; | |
| } | |
| return $payment_options . $output; | |
| } | |
| add_filter( 'leaky_paywall_subscription_options_payment_options', 'leaky_paywall_2checkout_add_signup_link', 7, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment