Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working remotely 😈

Mary Job MaryOJob

🏠
Working remotely 😈
View GitHub Profile
@MaryOJob
MaryOJob / pmpro-limited-time-registration.php
Created Mar 11, 2022 — 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
View pmpro-limited-time-registration.php
<?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 Feb 16, 2022 — forked from ronalfy/directory.php
Paid Memberships Pro Directory Customization
View directory.php
<?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 / my_pmpro_aweber_custom_fields.php
Last active Oct 26, 2021 — forked from strangerstudios/my_pmpro_aweber_custom_fields.php
Send custom field(s) from WordPress to Aweber through the PMPro Aweber addon
View my_pmpro_aweber_custom_fields.php
<?php // do not copy this line
/*
* This example sends two custom fields from WordPress to AWeber through the PMPro AWeber addon.
* Go to Aweber to create your custom field(s)
* Make sure the custom field in aweber matches the input name for your custom fields added via the Register Helper extension
* Add this code to your active theme's functions.php or a custom plugin: https://www.paidmembershipspro.com/how-to-add-code-to-wordpress/
*/
function my_pmpro_aweber_custom_fields( $fields, $user ) {
@MaryOJob
MaryOJob / my-pmpro-change-admin-email.php
Last active Sep 28, 2021 — forked from andrewlimaza/my-pmpro-change-admin-email.php
Change the admin email to three different recipients for all Paid Memberships Pro admin emails - Useful if you want your team to be notified on Member Notifications
View my-pmpro-change-admin-email.php
<?php // do not copy this line
/**
* Change the email address to three other recipients for all admin related emails in Paid Memberships Pro.
* Follow this guide to add custom code to your WordPress site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_change_admin_to_email( $user_email, $email ){
if( strpos( $email->template, "_admin" ) !== false ) {
$user_email = 'memberadmin@someemail.co, othermemberadmin@someemail.co, othermemberadmin3@someemail.co';
@MaryOJob
MaryOJob / my_pmpro_userpages_mail_member_post_updated.php
Last active Sep 24, 2021
Email a member whenever their User Page (PMPro User Pages Add On) is updated - PMPro
View my_pmpro_userpages_mail_member_post_updated.php
<?php // do not copy this line
/**
* This recipe will email the member whose user page is updated, everytime it is updated with any information.
* Thanks to @ShoboySnr and @webcreativeng for helping with this gist, and @JarrydLong for modifying further
* 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-change-admin-to-email.php
Last active Sep 7, 2021 — forked from andrewlimaza/pmpro-change-admin-to-email.php
Add bcc for PMPro admin emails [Paid Memberships Pro]
View pmpro-change-admin-to-email.php
<?php // do not copy this line
/**
* Add bcc for PMPro admin emails
* Follow this guide to add custom code to your site - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_email_headers_admin_emails($headers, $email)
{
//bcc emails already going to admin_email
@MaryOJob
MaryOJob / disable_email_template_memberlevel.php
Last active Sep 6, 2021 — forked from femiyb/disable_email_template_memberlevel.php
Disable Recurring Payment Reminder Emails for Specific Levels - PMPro
View disable_email_template_memberlevel.php
<?php // do not copy this line
/**
* This recipe will disable the recurring payment email reminders for the specifc levels stated
*
* 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 / my_pmpro_disable_reminder_email_per_level.php
Last active Jan 21, 2022
Disable Recurring Payment Reminder Emails for Specific Level(s) - PMPro
View my_pmpro_disable_reminder_email_per_level.php
<?php // do not copy this line
/**
* This recipe will disable the recurring payment email reminders for the specifc levels stated
*
* 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 / disable_pmpropbc_send_invoice_email.php
Created Sep 2, 2021 — forked from dparker1005/disable_pmpropbc_send_invoice_email.php
Disables sending a invoice emails for check orders whenever an order is saved in success status.
View disable_pmpropbc_send_invoice_email.php
<?php
/**
* Disables sending a invoice emails for check orders whenever an order is saved
* in success status.
*
* 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_polylang_translate_notloggedintext.php
Created Aug 31, 2021 — forked from dparker1005/pmpro_polylang_translate_notloggedintext.php
Translates the PMPro Not Logged In text while using Polylang.
View pmpro_polylang_translate_notloggedintext.php
<?php
// Copy from below here...
/*
* Translates the PMPro Not Logged In text while using Polylang.
* Currently set up to use US English and Spain Spanish.
*/
function my_pmpro_polylang_translate_notloggedintext( $value, $options ) {
switch ( get_locale() ) {