Skip to content

Instantly share code, notes, and snippets.

View kimwhite's full-sized avatar

Kim White kimwhite

View GitHub Profile
@kimwhite
kimwhite / gist:f947992375143780c364
Created November 6, 2014 22:56
fix social icons with multiple parked domains
Added this to the .htaccess page
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
@kimcoleman
kimcoleman / pmpro-columns-grid-checkout.css
Last active August 17, 2021 13:34
Custom CSS for Membership Checkout page using CSS Grid: 2 Column Layout for "Account Information" and "Billing Information" sections.
.pmpro-checkout .pmpro_form {
display: -ms-grid;
display: grid;
grid-column-gap: 1em;
-ms-grid-columns: 1 1em 1;
grid-template-columns: 1 1;
grid-template-areas:
"message message"
"pricing pricing"
"user address"
@andrewlimaza
andrewlimaza / my-own-pmpro-pdf-variable-template.php
Created March 31, 2020 16:48
Add custom variables to PMPro PDF Invoices Templates
<?php
/**
* This example shows you how to create custom variables for your email templates.
* All customers that have purchased an 'All Access' pass get up to 5 custom variables created to help get you started.
* https://yoohooplugins.com/all-access
*/
function my_custom_pmpro_pdf_variable( $data_array, $user, $order_data ) {
$data_array['{{user_name_example}}'] = $user->user_nicename;
return $data_array;
}
<?php
/**
* Creates shipping address fields for 'child' accounts when using the Sponsored/Group Members for Paid Memberships Pro.
* This requires the following attribute 'sponsored_accounts_at_checkout' => true for checkout.
* PLEASE NOTE: Using the Register Helper Add On (or similar) may interfere with this code if field names match.
*
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* Skill Required: Advanced.
*/
@kimwhite
kimwhite / duplicate_usermeta_to_xprofile.php
Last active May 19, 2021 11:34 — forked from kimcoleman/duplicate_usermeta_to_xprofile.php
Duplicate usermeta fields as xprofile fields. Sync BuddyPress and PMPro
<?php
/**
* This recipe run a script to sync your PMPro Registration Fields with BuddPress xprofie fields
*
* Add this to a custom plugin then run by adding this to your domain `/wp-admin/?pmpromm_process=1`
* Remove when finished.
* 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.
@ipokkel
ipokkel / my-pmprosus-custom-email-password-string.php
Created March 24, 2021 06:51
Improve layout in confirmation emails sent when user checked out with PMPro Signup Shortcode set with the emailonly option. #pmpro-signup-shortcode #gettext
<?php
/**
* This recipe adds a line break after the password and email included in
* the confirmation email sent by PMPro Signup Shortcode when the option
* short is set to emailonly.
*
* To improve layout in the email you may use the Email Template Editor
* to change the layout of the !!user_email!! shortcode by removing the
* wrapping brackets.
*
@andrewlimaza
andrewlimaza / mmpu-woocommerce-enable.php
Created April 29, 2021 11:46
Allow user's to hold multiple levels with MMPU and WooCommerce for Paid Memberships Pro.
<?php
/**
* This allows user's to have multiple levels when purchasing via WooCommerce.
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
add_filter( 'pmprowoo_mmpu_force_add_level', '__return_true' );
@sc0ttkclark
sc0ttkclark / login-link.html
Created June 3, 2021 01:54
Login link example for PMPro
<?php //do not copy
/**
* This recipe update the level cost text based on the Country selected. This recipe will work
* with the VAT Tax Add On for EU customers.
*
* 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/
@kimwhite
kimwhite / my_pmpro_change_text_example.php
Last active November 23, 2022 16:51 — forked from femiyb/my_pmpro_change_text_example.php
PMPro - Change Text Example on Checkout Page by LEVEL
<?php // Do Not Copy This Line
/**
* This recipe will help you change text on the checkout paid by level
* 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/
*/
// paste content from below this line