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 / my-pmprorh-extra-fields-admin-email.php
Created September 29, 2022 17:05 — forked from ipokkel/my-pmprorh-extra-fields-admin-email.php
Add Register Helper fields to the admin checkout notification email.
<?php
/**
* Add Custom Registration Fields and their values to the Admin Checkout Notification Email.
*
* 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/
*/
@MaryOJob
MaryOJob / pmpro-extra-fields.php
Created September 22, 2022 21:45 — forked from ronalfy/pmpro-extra-fields.php
PMPro - Add Extra Fields - Sync with Add User from Admin
<?php
/**
* Modified customer gist. Adds profile fields and saves them.
* Compatible with Add User from Admin Add-On
*
* 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/
*/
@MaryOJob
MaryOJob / stop-renewing-members-multiple-levels.php
Last active June 10, 2022 16:25 — forked from travislima/stop-renewing-members.php
Stop different members on different levels from renewing their current membership level [Paid Memberships Pro].
<?php // Do not copy this line
/**
* Stop members from renewing their current membership level.
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function stop_members_from_renewing( $okay ) {
// If something else isn't okay, stop from running this code further.
@MaryOJob
MaryOJob / my_pmproan2c_change_priority.php
Last active June 1, 2022 07:35 — forked from ipokkel/my_pmproan2c_change_priority.php
Reorder the PMPro "Add First and Last Name (add-on)" field setting it to display after the username field
<?php // Do not copy this line
/* Load add name to checkout (pmproan2c) earlier than default
* Can be used to reposition name fields when multiple custom fields are
* loaded after the username field on the checkout page
* Add this code to your PMPro Customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmproan2c_change_priority() {
remove_action( 'pmpro_checkout_after_password', 'pmproan2c_pmpro_checkout_after_password' );
@MaryOJob
MaryOJob / pmpro-uk-taxes.php
Created December 18, 2020 05:59 — forked from ronalfy/pmpro-uk-taxes.php
Gist UK Taxes on Checkout / Invoice / Etc.
<?php
/**
* 1. Adds 20% tax text to the level cost text.
* 2. Adds 20% tax to invoice if checking out as UK customer.
* 3. Adds 20% tax if UK to checkout and invoice.
*
* 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/
@MaryOJob
MaryOJob / pmpro-limited-time-registration.php
Created March 11, 2022 18:11 — forked from JarrydLong/pmpro-limited-time-registration.php
Restrict a membership level to no longer allow sign ups after a given date (limited time offer) using Paid Memberships pro
<?php
/* Checks to see if a registration is happening after a given date; if so, prevent registration and stop new signups for the level/no longer display the level on the levels page
*/
global $pmproml_start_date, $pmproml_end_date, $pmproml_limited_level_id;
$pmproml_limited_level_id = array( 1, 2, 4 ); // change to the ID of the limited-time membership level
$pmproml_start_date = "2019/04/01"; // change to the date registration starts, in YYYY/MM/DD format
$pmproml_end_date = "2019/04/30"; // change to the date registration ends, in YYYY/MM/DD format
@MaryOJob
MaryOJob / directory.php
Created February 16, 2022 11:53 — forked from ronalfy/directory.php
Paid Memberships Pro Directory Customization
<?php
/*
This shortcode will display the members list and additional content based on the defined attributes.
*/
function pmpromd_shortcode($atts, $content=null, $code="")
{
// $atts ::= array of attributes
// $content ::= text within enclosing form of shortcode element
// $code ::= the shortcode found, when == callback name
// examples: [pmpro_member_directory show_avatar="false" show_email="false" levels="1,2"]
@MaryOJob
MaryOJob / pmpro_move_name_fields.php
Last active December 2, 2021 17:05 — forked from femiyb/pmpro_move_name_fields.php
This Code Gist Will Move the Fields in this order, First Name, Last Name, Email Address and Password When using the Code to Generate a username at PMPro checkout from email for users and hiding the username field with CSS - Links for this below
<?php // Do not Copy This Line
/**
* Add the following code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function pmpro_move_name_fields() {
global $pmpro_pages;
if(is_page($pmpro_pages['checkout'])) {
?>
@MaryOJob
MaryOJob / terms-of-service-as-a-link-only.php
Last active November 11, 2021 15:02 — forked from ipokkel/terms-of-service-as-a-link-only.php
Create a a text link to a media file (PDF) for a Terms & Conditions checkbox on checkout. #pmpro #pdf
<?php
/**
* This recipe will add a widget to the member directory where users can filter
* members based on location and distance.
* Requires PMPro Membership Directory > v1.0 + PMPro Membership Maps Add Ons
*
* 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/