Skip to content

Instantly share code, notes, and snippets.

🏠
Working remotely 😈

Mary Job MaryOJob

🏠
Working remotely 😈
Block or report user

Report or block MaryOJob

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MaryOJob
MaryOJob / register-helper-test1.php
Last active Nov 21, 2019
Adding Five Custom Fields to PMPro Accounts Page
View register-helper-test1.php
<?php
/**
* Register Helper example for five fields. This is a test Register Helper example.
* 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/
*/
function my_pmprorh_init() {
//don't break if Register Helper is not loaded
if(!function_exists( "pmprorh_add_registration_field" )) {
@MaryOJob
MaryOJob / my_pmpro_invoice_member_emails.php
Last active Nov 25, 2019
BCC all PMPro Invoice Emails to a Certain Address
View my_pmpro_invoice_member_emails.php
<?php
/*
Bcc admin on PMPro members invoice emails only
You can change the conditional to check for a certain $email->template or some other condition before adding the BCC.
*/
function my_pmpro_email_headers_admin_emails($headers, $email)
{
//bcc checkout emails
@MaryOJob
MaryOJob / my_pmpro_change_state_to_county.php
Last active Nov 26, 2019
Change the word "State" to "County" for Paid Memberships Pro
View my_pmpro_change_state_to_county.php
<?php
/* This replaces all fields with 'state' with 'county'
* Add the code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_replace_text_for_pmpro_pages($text) {
global $pmpro_pages;
if ( is_page( $pmpro_pages['checkout'] ) || is_page( $pmpro_pages['confirmation'] ) || is_page( $pmpro_pages['account'] ) || is_page( $pmpro_pages['billing'] ) || is_page( $pmpro_pages['cancel'] ) || is_page( $pmpro_pages['invoice'] ) || is_page( $pmpro_pages['levels'] ) ) {
$text = str_replace( 'State', 'County', $text) ;
@MaryOJob
MaryOJob / my_pmpro_email_headers_admin_emails.php
Last active Dec 12, 2019 — forked from femiyb/my_pmpro_email_headers_admin_emails.php
BCC all PMPro Register/Checkout Emails to a Certain Address
View my_pmpro_email_headers_admin_emails.php
<?php
/*
Add bcc for checkout emails
*/
function my_pmpro_email_headers_admin_emails($headers, $email) {
//bcc checkout emails
if(strpos($email->template, "checkout_") !== false) {
//add bcc
$headers[] = "Bcc:" . "otheremail@domain.com";
}
@MaryOJob
MaryOJob / my_pmpro_sync_xprofile_to_member_directory.php
Last active Dec 20, 2019
Sync XProfile Fields with PMPro Members Directory using Register Helper
View my_pmpro_sync_xprofile_to_member_directory.php
<?php
/**
* Based on the Register Helper example.
* We've added a "buddypress" option for each field
* set to the XProfile name we used when setting up
* the fields in the BuddyPress extended profile.
* If the PMPro BuddyPress Add On is activated
* then the fields will be synchronized.
* Register Helper: https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/
@MaryOJob
MaryOJob / my_pmpro_custom_text_field.php
Last active Dec 20, 2019
Adding a Custom Text Field to PMPro Checkout Page
View my_pmpro_custom_text_field.php
<?php
/**
* Register Helper example for five fields. This is a test Register Helper example.
* 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/
*/
function my_pmprorh_init() {
//don't break if Register Helper is not loaded
if(!function_exists( "pmprorh_add_registration_field" )) {
@MaryOJob
MaryOJob / my_pmpro_custom_select_and_text_fields_to_register_helper.php
Last active Jan 6, 2020
Adding A Custom Field (Select & Text) to Register Helper
View my_pmpro_custom_select_and_text_fields_to_register_helper.php
<?php
/**
* Register Helper example for a select and text field.
* 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/
*/
function my_pmprorh_init() {
//don't break if Register Helper is not loaded
if(!function_exists( "pmprorh_add_registration_field" )) {
@MaryOJob
MaryOJob / pmprosm_sponsored_account_levels.php
Last active Jan 14, 2020 — forked from ideadude/pmprosm_sponsored_account_levels.php
Example global settings for the PMPro Sponsored Members Add On
View pmprosm_sponsored_account_levels.php
<?php
/*
Define the global array below for your main accounts and sponsored levels.
Array keys should be the main account level.
*/
$pmprosm_sponsored_account_levels = array(
/*
@MaryOJob
MaryOJob / my_pmpro_login_redirect_url.php
Created Jan 15, 2020 — forked from travislima/my_pmpro_login_redirect_url.php
Redirect on login if user has any failed payments. (Requires Paid Memberships Pro Failed Payment Limit Add On)
View my_pmpro_login_redirect_url.php
<?php
/*
* Redirect on login if user has any failed payments. (Requires Paid Memberships Pro Failed Payment Limit Add On)
* Adjust the code on the line the line "site_url( ' payment-failed')" to redirect to page of your prefereance.
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_login_redirect_url( $url, $request, $user ) {
@MaryOJob
MaryOJob / show_buddypress_email_on_xprofile_page.php
Created Jan 16, 2020
Show WordPress email on BuddyPress user xprofiles page
View show_buddypress_email_on_xprofile_page.php
<?php // do not copy this line, doing so will give you a fatal error when you run this script
/*
If you are using this code, please be aware of privacy laws in your region and also beware of spambots harvesting your users'
emails from your website.
*/
function tiquality_add_custom_field() {
if ( bp_is_active( 'xprofile' ) ) :
You can’t perform that action at this time.