Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working remotely 😈

Mary Job MaryOJob

🏠
Working remotely 😈
View GitHub Profile
@MaryOJob
MaryOJob / my_pmpro_fields_for_tonis.php
Created Sep 21, 2020
Add Custom Fields Example in a Checkbox Area with a Custom Name
View my_pmpro_fields_for_tonis.php
<?php // Do not copy this line.
/**
* See the PMPro Register Helper readme for more information and examples: https://www.paidmembershipspro.com/documentation/register-helper-documentation/adding-fields/
* Please add the below code to your custom plugin or Code Snippets Plugin by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
// We have to put everything in a function called on init, so we are sure Register Helper is loaded.
function pmpro_register_field_peakbagger_init() {
// Don't break if Register Helper is not loaded.
@MaryOJob
MaryOJob / my_pmpro_sponsored_members_example.php
Last active Sep 17, 2020
My PMPro Sponsored Members Code Example
View my_pmpro_sponsored_members_example.php
<?php // Do not copy this line please.
/**
* This Sample shows how a Sponsor can create users (child accounts) at checkout
* Using the Sponsored/Group Members Add On for PMPro
* https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/#checkoutoptions
* 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/
View pmpro account page edit
// overwite the account shortcode
function overwite_pmpro_shortcode_account($atts, $content=null, $code="")
{
global $wpdb, $pmpro_msg, $pmpro_msgt, $pmpro_levels, $current_user, $levels;
// $atts ::= array of attributes
// $content ::= text within enclosing form of shortcode element
// $code ::= the shortcode found, when == callback name
// examples: [pmpro_account] [pmpro_account sections="membership,profile"/]
@MaryOJob
MaryOJob / pmpro-australia-gst.php
Created Sep 10, 2020 — forked from strangerstudios/pmpro-australia-gst.php
Paid Memberships Pro - Australia GST
View pmpro-australia-gst.php
<?php
/*
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-default-wp-user-checkout-fields.php
Last active Aug 28, 2020 — forked from ipokkel/my-default-wp-user-checkout-fields.php
Capture default user profile 'Bio' field at Membership Checkout using Register Helper and save with custom callback using save_function for RH
View my-default-wp-user-checkout-fields.php
<?php
/**
* This recipe adds 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 / pmpro-mmpu-disable-level-deselection.php
Created Aug 13, 2020
Disable Level Deselection when using PMPro MMPU
View pmpro-mmpu-disable-level-deselection.php
<?php
/**
* MMPU - Prevent user from de-selecting a level if they have previously checked out for level.
*/
function pmpro_output_level_jquery_mmpu_disable() {
if ( wp_script_is( 'jquery', 'done' ) && is_page( 'membership-levels' ) ) {
?>
<script>
@MaryOJob
MaryOJob / my_pmpro_change_text_page_example.php
Created Aug 13, 2020
Change PMPro Wording on Edit Profile Page
View my_pmpro_change_text_page_example.php
<?php
/**
* This recipe changes the text 'Cancel' only on the Edit Profile Page because the word also appears on the Membership accounts page
* This should be added to a PMPro Customizations or Code Snippets Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* Thank you to Ronald, for assisting in writing this snippet.
**/
function pmpro_init_cancel_gettext() {
add_filter( 'gettext', 'pmpro_change_cancel_text_gettext', 10, 3 );
@MaryOJob
MaryOJob / pmpro-restrict-email-levels.php
Last active Aug 12, 2020 — forked from ronalfy/pmpro-restrict-email-level.php
Paid Memberships Pro - Restrict Email for More Than One Level
View pmpro-restrict-email-levels.php
<?php // Do not copy this line
/**
* Restrict Membership Signup by Email Domain
* Make sure to edit the $valid_domains array defined further below
* to include only the domains you'd like to allow.
*
* Add this code to a custom plugin. More info: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@MaryOJob
MaryOJob / pmpro-rh-ec-fields.php
Created Aug 10, 2020 — forked from ronalfy/pmpro-rh-ec-fields.php
Paid Memberships Pro Register Helper Adding Emergency Contact Fields
View pmpro-rh-ec-fields.php
<?php
// We have to put everything in a function called on init, so we are sure Register Helper is loaded.
function pmpro_register_field_peakbagger_init() {
// Don't break if Register Helper is not loaded.
if ( ! function_exists( 'pmprorh_add_registration_field' ) ) {
return false;
}
pmprorh_add_checkout_box( 'contact', 'Contact Information' );
pmprorh_add_checkout_box( 'emergency', 'Emergency Contact Information' );
@MaryOJob
MaryOJob / my_pmpro_change_text_example.php
Last active Jul 15, 2020 — forked from kimwhite/my_pmpro_change_text_example.php
Change text example in a PMPro Page Template.
View my_pmpro_change_text_example.php
<?php // Do Not Copy This Line Please
/**
* This recipe replaces text strings in the content filter.
*
* 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/
*/
You can’t perform that action at this time.