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 | |
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 |
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 | |
/** | |
* Notification bar when post views are being tracked and restricted by the Limit Post Views Add On | |
*/ | |
function add_notification_bar_for_limit_post_view() { | |
// check for past views and if we are on a single page. needs to check if the post is locked at all by default. | |
if ( ! empty( $_COOKIE['pmpro_lpv_count'] ) && is_single() ) { | |
global $current_user; | |
// Check cookie for views value. |
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 | |
/** | |
* Custom membership-card template: Set recurring membership renewal date as expiration date. | |
* Place this directly in your theme/child-theme's root directory | |
* e.g.: example.com/wp-content/themes/{your active theme}/membership-card.php | |
*/ | |
global $wpdb, $pmpro_membership_card_user, $pmpro_currency_symbol, $post; |
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
<h3>Lorem Isupm, !!display_name!!</h3> | |
<p>Any content can be added here.</p> | |
<p>Please see the <i>Variable Reference</i> at https://www.paidmembershipspro.com/add-ons/email-templates-admin-editor/</p> | |
<p>Account: !!display_name!! (!!user_email!!)</p> | |
<p>Log in to your membership account here: !!login_link!!</p> |
NewerOlder