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 | |
| add_filter( 'leaky_paywall_subscribers_columns', 'zeen101_add_column_for_custom_field' ); | |
| add_filter( 'manage_leaky_paywall_subscribers_custom_column', 'zeen101_add_data_to_custom_field_column', 10, 3 ); | |
| function zeen101_add_column_for_custom_field( $columns ) { | |
| $columns['zeen101_custom_field'] = 'Zeen101 Custom Field'; | |
| return $columns; |
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
| add_action( 'leaky_paywall_before_registration_form', 'omg_show_vat_on_subscription_details' ); | |
| function omg_show_vat_on_subscription_details( $level ) { | |
| $vat_price = omg_calculate_vat_total( $level['price'] ); | |
| echo '<p><strong>With VAT Tax: </strong> ' . leaky_paywall_get_current_currency_symbol() . $vat_price . '</p>'; | |
| } |
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 | |
| add_filter( 'leaky_paywall_login_form_args', 'zeen101_login_referrer_redirect' ); | |
| function zeen101_login_referrer_redirect( $args ) { | |
| $referrer = $_SERVER['HTTP_REFERER']; | |
| if ( !$referrer ) { |
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 | |
| add_action( 'leaky_paywall_failed_payment', 'zeen101_send_payment_failed_notification' ); | |
| function zeen101_send_payment_failed_notification( $user ) { | |
| $to = $user->user_email; | |
| $subject = 'Your payment has failed'; | |
| $body = 'We are sorry to inform you that your attempt at payment has failed. Please <a href="https://examplesite.com/my-account/">log in to your account</a> on Example Site and update your credit card information.'; | |
| $headers = array('Content-Type: text/html; charset=UTF-8','From: Example Site <[email protected]>'); |
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 | |
| add_filter( 'leaky_paywall_process_stripe_payment_customer_array', 'zeen101_add_meta_to_stripe_customer' ); | |
| function zeen101_add_meta_to_stripe_customer( $customer_array ) { | |
| $customer_array['metadata'] = array( | |
| 'company_name' => 'name of company', | |
| 'company_billing_address' => 'billing address', | |
| ); |
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 login_form_shortcode( $atts, $content = null ) { | |
| extract( shortcode_atts( array( | |
| 'redirect' => '' | |
| ), $atts ) ); | |
| if (!is_user_logged_in()) { |
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 | |
| add_action( 'leaky_paywall_failed_payment', 'zeen101_send_payment_failed_notification' ); | |
| function zeen101_send_payment_failed_notification( $user ) { | |
| $to = $user->user_email; | |
| $subject = 'Your payment to XXXX Publication has failed'; | |
| $body = 'We are sorry to inform you that your attempt at payment for XXXX Publication has failed. Please <a href="https://yourdomain.com/my-account/">log in to your account</a> on XXXX Publication and update your credit card information.'; |
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 | |
| add_filter( 'leaky_paywall_new_email_message', 'zeen101_per_level_email_message', 10, 2 ); | |
| function zeen101_per_level_email_message( $message, $user_id ) { | |
| $mode = leaky_paywall_get_current_mode(); | |
| $level_id = get_user_meta( $user_id, '_issuem_leaky_paywall_' . $mode . '_level_id', true ); | |
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 | |
| add_filter( 'leaky_paywall_content_access_description', 'zeen101_adjust_content_access_description', 10, 3 ); | |
| function zeen101_adjust_content_access_description( $content_access_description, $level, $level_id ) { | |
| switch ( $level_id ) { | |
| case 0: | |
| $output = '<ul>'; | |
| $output .= '<li>Gold Benfit #1</li>'; |