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-list-member-pages.php
Created July 27, 2021 06:48 — forked from kimwhite/pmpro-list-member-pages.php
Shortcode to display pages a current member has access to...see comments and notes for details.
<?php // do not copy this line.
/**
* Shortcode [member_content_list] to display pages a current member has access to.
* Only shows those pages with explicit membership settings. ie those set with the
* "Require Membership" box on pages, CPTs (if the PMPro CPTs plugin is used), and posts.
* It does not show those posts restricted by categories.
*
* 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.
@MaryOJob
MaryOJob / my_add_select_all_levels.php
Created July 30, 2021 07:44 — forked from ideadude/my_add_select_all_levels.php
Add "select all" option inside the PMPro Require Membership box
<?php
/**
* Add "select all" option inside the Require Membership box
* 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/
*/
function my_add_select_all_levels() {
?>
@MaryOJob
MaryOJob / my_pmpro_no_charge_membership_site.php
Last active August 3, 2021 19:59 — forked from strangerstudios/my_pmpro_no_charge_membership_site.php
Customizations to remove all mention of payments, fees, price, etc for SPECIFIC LEVELS ONLY
<?php // do not copy this line
/*
* Customizations to remove all mention of payments/fees/price for a 100% no-charge membership site.
* Add this to a PMPro customizations or Code Snippets Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_level_cost_text($text, $level) {
if(pmpro_isLevelFree($level))
return "";
@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
@MaryOJob
MaryOJob / pmpro-mc-merge-enddate.php
Last active August 17, 2021 10:59 — forked from ipokkel/pmpro-mc-merge-enddate.php
Add the enddate to Mailchimp Merge fields if it exists otherwise return "N/A"
<?php // do not copy this line
/**
* Add this to a PMPro customizations or Code Snippets Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
**/
add_action( 'pmpro_mailchimp_listsubscribe_fields', 'my_pmpro_mailchimp_listsubscribe_fields', 10, 2 );
function my_pmpro_mailchimp_listsubscribe_fields( $fields, $user ) {
// Get user level
$level = pmpro_getMembershipLevelForUser( $user->ID );
@MaryOJob
MaryOJob / example-pmprorh-save-function-with-registration-check.php
Created August 17, 2021 16:23 — forked from ipokkel/example-pmpro-save-function-with-registration-check.php
Collect the default WordPress Website URL and Biographical description during Membership Checkout with Register Helper fields using save_function custom callback that includes a validation check which returns an error message if the field value failed the check.
<?php
/**
* This recipe adds Website and Biographical Info to the Membership Checkout.
*
* 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 / add-pmpro-name-to-email.php
Last active August 26, 2021 23:49 — forked from andrewlimaza/add-pmpro-names-to-email.php
Add first name variable to Paid Memberships Pro Emails
<?php // do not copy this line
/**
* Adds !!first_name!! variable to be used with the Paid Memberships Pro Email Templates.
* This data will be available for all Paid Memberships Pro emails.
* Add the below code to your PMPro Customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* And edit the email templates you want to add this to
*/
function add_first_name_to_pmpro_emails( $data, $email ) {
@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>
@MaryOJob
MaryOJob / my_pmpro_always_show_renew_levels.php
Last active July 5, 2024 12:20 — forked from femiyb/my_pmpro_always_show_renew_levels.php
Always show renew links for certain PMPro levels if the member already has that level.
<?php // do not copy this line
/*
* This recipe would always show the renew link on the membership account page for the specified levels on line 13
* Add the below code to your PMPro Customizations Plugin:
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
// always show renew links for certain levels if the member already has that level.
@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
*/