Skip to content

Instantly share code, notes, and snippets.

View MaryOJob's full-sized avatar
🏠
Working remotely 😈

Mary Job MaryOJob

🏠
Working remotely 😈
View GitHub Profile
@MaryOJob
MaryOJob / pmpro-australia-gst.php
Last active December 21, 2023 12:07 — forked from ideadude/pmpro-australia-gst.php
Paid Memberships Pro - Australia GST (Checkbox on by default)
<?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
*/
@MaryOJob
MaryOJob / my_pmpro_email_confirmation_text.php
Last active December 14, 2023 18:24 — forked from ideadude/my_pmpro_email_confirmation_text.php
Change the confirmation text when using PMPro and the Email Confirmation Add On.
<?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.
@MaryOJob
MaryOJob / redirect_after_pmpro_checkout.php
Last active October 27, 2023 12:12 — forked from ugonkwocha/PMPro Gist
Redirect to another page / site after a PMPro checkout.
<?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))
@MaryOJob
MaryOJob / my_pmprolpv_has_membership_access.php
Created October 12, 2023 13:41 — forked from messica/my_pmprolpv_has_membership_access.php
Limit Post Views: Don't allow post views for certain categories.
<?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' );
@MaryOJob
MaryOJob / pmpro-add-on-learn-dash.php
Created September 15, 2023 12:26 — forked from ronalfy/pmpro-add-on-learn-dash.php
Paid Memberships Pro - Add On Packages Plus LearnDash
<?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()
{
@MaryOJob
MaryOJob / pmpro-lock-membership-levels-allow-renewal.php
Last active July 31, 2023 14:33 — forked from ipokkel/pmpro-lock-membership-levels-allow-renewal.php
PMPro Lock Membership Levels - Allow members to cancel their own level but not change their current level
<?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
*
@MaryOJob
MaryOJob / no-oembed-pmpromd-pages.php
Created November 9, 2022 11:42 — forked from ipokkel/no-oembed-pmpromd-pages.php
Prevent oembeds from running on the PMPro Member Directory Add On pages.
<?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
@MaryOJob
MaryOJob / add_notification_bar_for_limit_post_view.php
Created July 3, 2023 17:32 — forked from kimcoleman/add_notification_bar_for_limit_post_view.php
Notification bar when post views are being tracked and restricted by the Limit Post Views Add On
<?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.
@MaryOJob
MaryOJob / membership-card.php
Created June 15, 2023 15:43 — forked from ipokkel/membership-card.php
Custom PMPro Membership Card template displaying the renewal date under expiration date
<?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;
@MaryOJob
MaryOJob / mycustom_confirmation.html
Created August 30, 2021 11:30 — forked from gausam/mycustom_confirmation.html
Send additional custom confirmation email
<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>