Skip to content

Instantly share code, notes, and snippets.

View ipokkel's full-sized avatar

Theuns Coetzee ipokkel

View GitHub Profile
@andrewlimaza
andrewlimaza / pmpro-remove-sub-delay.php
Last active September 2, 2022 09:51
Remove subscription delay for existing members [Paid Memberships Pro]
<?php
/**
* Remove subscription delay for existing/past members.
* Add code to your site following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*
* Please note that you should probably have the Initial Payment amount set if removing the Subscription Delay to avoid free periods.
* Take note of this gist to adjust the Level Cost Text dynamically - https://gist.github.com/kimcoleman/8d0e655be9d2e8fd9545da4692c8b786
*
* This code snippet is for advanced users/developers.
*
@andrewlimaza
andrewlimaza / remove-custom-trial-for-existing-past-members.php
Created March 2, 2020 09:41
Remove custom trials for members or past members. [Paid Memberships Pro]
<?php
/**
* Remove custom trials for existing and past members.
* Add this code to your site following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function pmpro_remove_trial_for_past_members( $level ) {
// Ignore if user is not logged-in.
if ( ! is_user_logged_in() ) {
@andrewlimaza
andrewlimaza / automatically-approve-previously-approved.php
Last active April 25, 2025 13:11
Automatically approve, previously approved members. [Paid Memberships Pro]
<?php
/**
* Automatically approve any previously approved member.
* Add this code to your site following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_automatically_approve_previously_approved( $level_id, $user_id, $cancelled_level ) {
if ( ! class_exists( 'PMPro_Approvals' ) ) {
return;
@andrewlimaza
andrewlimaza / remove-custom-trial-for-existing-members.php
Created February 6, 2020 10:23
Remove trial limit for existing members. [Paid Memberships Pro]
<?php
/**
* Remove custom trial for existing members (when existing member changes levels/renews)
* Adjust the level ID on line 16 to match your needs.
* Add this code to your WordPress site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_level_adjustment( $level ) {
// Bail if the user currently doesn't have a membership level.
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active May 19, 2025 08:58
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@dparker1005
dparker1005 / my_hook_analizer_widget_function.php
Last active January 18, 2021 05:28
See all functions hookoing into login_redirect hook
<?php
// Copy from below here...
/*
* See all functions hookoing into login_redirect hook
*/
function my_hook_analizer_widget_function( $post, $callback_args ) {
print_filters_for( 'login_redirect' );
}
@dparker1005
dparker1005 / my_pmpro_canadian_tax.php
Last active March 28, 2023 09:57
Apply Canadian taxes to Checkouts with PMPro
<?php
/*
* Plugin Name: Paid Memberships Pro - Canadian Tax
* Description: Apply Canadian taxes to Checkouts with PMPro
* Version: .1
* Author: Stranger Studios
* Author URI: http://www.strangerstudios.com
*/
/*
@andrewlimaza
andrewlimaza / immediate-access-series.php
Created January 20, 2020 12:50
Immediate access for PMPro Series Dripfeed
<?php
/**
* Adds settings to Advanced Settings wheree you can set levels by comma separated list. E.G. 1,2,4,5
* Users with defined levels will gain immediate access to dripfeed content. Other member's won't and will have to wait according to dripfeed settings.
* ****Currently requires pre-release of Series Add On V0.4.2+
*/
/**
* Overrides series delays if a membership level has been added
*/
@kimcoleman
kimcoleman / pmpro-columns-grid-checkout.css
Last active August 17, 2021 13:34
Custom CSS for Membership Checkout page using CSS Grid: 2 Column Layout for "Account Information" and "Billing Information" sections.
.pmpro-checkout .pmpro_form {
display: -ms-grid;
display: grid;
grid-column-gap: 1em;
-ms-grid-columns: 1 1em 1;
grid-template-columns: 1 1;
grid-template-areas:
"message message"
"pricing pricing"
"user address"
@ideadude
ideadude / directory.php
Created January 17, 2020 05:50 — forked from greathmaster/directory.php
Custom directory template. Alphabetical last name search, and meta key/value search.
<?php
/*
Custom directory template. Adds alphabetical last name query. For example you can use the URL:
http://www.example.com/membership-account/directory/?lt=A
if you want all the members with last names starting with 'A'.
Also includes meta key/value search. For example you can use the URL: