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
<?php // do not copy this line | |
/* | |
Plugin Name: Paid Memberships Pro - Australia GST | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-australia-gst/ | |
Description: Apply Australia GST to Checkouts with PMPro | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
*/ |
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 | |
/** | |
* Change the "IMPORTANT!" confirmation text when using PMPro and the Email Confirmation Add On. | |
* Add this code into a custom plugin or code snippet. | |
* Be sure to change the translated lines below to the language and words you want. | |
* https://www.paidmembershipspro.com/how-to-add-code-to-wordpress/ | |
*/ | |
function my_pmpro_email_confirmation_text( $translated_text, $text, $domain ) { | |
// Ignore strings for other plugins. |
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 | |
/* See full article here please: https://www.paidmembershipspro.com/set-up-unique-membership-confirmation-pages-based-on-level/ | |
* Copy this into a PMPro Customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
**/ | |
function my_pmpro_confirmation_url($rurl, $user_id, $pmpro_level) { | |
if(pmpro_hasMembershipLevel(2)) | |
$rurl = "https://online.9jacodekids.com/my-account/"; | |
elseif(pmpro_hasMembershipLevel(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
<?php | |
/** | |
* Limit Post Views: Don't allow post views for certain categories. | |
*/ | |
function my_pmprolpv_has_membership_access( $has_access, $post ) { | |
// Set blocked categories here. | |
$blocked_categories = array( 'silver', 'gold' ); | |
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, it will trigger a fatal error. Copy from below please! | |
/* | |
* Bcc admin on specific email templates only | |
* more then one can be added like this: | |
* $headers[] = "Bcc:" . "otheremail@domain.com,anotheremail@domain.com"; | |
* You can change the conditional to check for a certain $email->template or some other condition before adding the BCC. | |
* Please add the below code to your site by following this guide: | |
* https://www.paidmembershipspro.com/how-to-add-code-to-wordpress/ | |
*/ |
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 replaces all fields with 'state' with 'county' | |
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
function my_replace_text_for_pmpro_pages($text) { | |
global $pmpro_pages; | |
if ( is_page( $pmpro_pages['checkout'] ) ){ | |
// if ( is_page( $pmpro_pages['profile'] ) ){ |
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 | |
global $pmpro_addon_pages_for_courses; | |
// 28 is the page ID; 24 is the course ID. | |
// 30 is the page ID; 26 is the course ID. | |
$pmpro_addon_pages_for_courses = array( | |
28 => 24, | |
30 => 26, | |
); | |
function pmproap_learndash_template_redirect() | |
{ |
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 allows members to cancel a locked membership level | |
* if the level was locked with PMPro Lock Membership Levels Add On. | |
* | |
* This recipe expects and requires the Membership Locked page set up | |
* and assigned under Memberships > Settings > Page settings. | |
* @link https://www.paidmembershipspro.com/add-ons/pmpro-lock-membership-level/#install | |
* |
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 | |
/** | |
* Prevent oembeds from running on the PMPro Member Directory Add On pages. | |
* | |
* This may be helpful if any external or social URLs are listed on the directory | |
* or profile page. | |
* | |
* Can clear oembed cache with steps here: https://siteorigin.com/clearing-oembed-cache/ | |
* | |
* You can add this recipe to your site by creating a custom plugin |
NewerOlder