This file contains 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 | |
/** | |
* When users cancel (are changed to membership level 0) we give them another "cancelled" level. | |
* Can be used to downgrade someone to a free level when they cancel. | |
* Will allow members to the "cancel level" to cancel from that though. | |
*/ | |
function pmpro_after_expiration_change_membership_levels( $level_id, $user_id ) { | |
// set this to the id of the level you want to give members when they cancel | |
$last_level_4 = 4; | |
$level_4_cancel_id = 3; |
This file contains 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
/* | |
Clear out all PMPro member and report data. (Back up your database first. Use at your own risk!!!) | |
This will delete all orders, members/level data, and reporting data. | |
Your levels, discount codes, and settings will remain in place. | |
All users will remain users (without memberships). | |
All subscriptions at the gateway will remain active. | |
To Use: | |
* Copy this code into your active theme's functions.php or a custom WP plugin. | |
* Navigate to /wp-admin/?pmprocleardata=1 when logged in as an admin. |
This file contains 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 bcc for checkout emails | |
*/ | |
function my_pmpro_email_headers_admin_emails($headers, $email) | |
{ | |
//bcc checkout emails | |
if($email->template == "membership_expiring" || $email->template == "membership_expired") | |
{ | |
//add bcc |
This file contains 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 this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
add_filter( 'gettext', 'change_my_text_example', 20, 3 ); | |
/** | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function change_my_text_example( $translated_text, $text, $domain ) { |
This file contains 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 the following code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Move Email And Confirm Email fields before password | |
*/ | |
function pmpro_move_name_fields() { | |
global $pmpro_pages; | |
if(is_page($pmpro_pages['checkout'])) { |
This file contains 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 | |
/** | |
* Adjust the 'Join Now' link on the login page to a custom URL for Paid Memberships Pro. | |
* Follow this guide to add custom code to your membership site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_custom_join_now_link( $links, $allowed_html ) { | |
$links['register'] = '<a href="https://www.thefixxsquad.stylefixxdaily.com/pricing/">' . __( 'Join Now', 'paid-memberships-pro' ) . '</a>'; | |
return $links; | |
} | |
add_filter( 'pmpro_login_forms_handler_nav', 'my_pmpro_custom_join_now_link', 10, 2 ); |
This file contains 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 // Do Not Copy This Line | |
/** | |
* This recipe will help you change text on the checkout paid in PMPro | |
* You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
// paste content from below this line | |
function pmproc_change_my_text( $translated_text, $text, $domain ) { |
This file contains 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
woocommerce_paypal_payments_checkout_button_renderer_hook | |
woocommerce_paypal_payments_checkout_dcc_renderer_hook | |
woocommerce_paypal_payments_pay_order_dcc_renderer_hook | |
woocommerce_paypal_payments_proceed_to_checkout_button_renderer_hook | |
woocommerce_paypal_payments_mini_cart_button_renderer_hook | |
woocommerce_paypal_payments_single_product_renderer_hook |
This file contains 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 | |
/** | |
* This recipe does Add State and Country to Account Information. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ |
This file contains 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 | |
/** | |
* This will change all instances of seat(s) to student(s) for the Sponsored Members Add On - https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/ | |
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_change_seat_to_student( $output_text, $input_text, $domain ) { | |
if ( 'pmpro-sponsored-members' === $domain ) { | |
$output_text = str_replace( 'seats', 'students', $output_text ); | |
$output_text = str_replace( 'Seats', 'Students', $output_text ); |
NewerOlder