Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
strangerstudios / gist:2323424
Created April 6, 2012 22:07
Hide the Level Description from the Checkout Page with Paid Memberships Pro
<?php
/*
In Paid Memberships Pro v1.4+ the memberhsip level description is shown on the checkout page. This code will remove the description on the checkout page.
*/
function my_pmpro_remove_description_from_checkout_page($level)
{
$level->description = "";
return $level;
}
add_filter("pmpro_checkout_level", "my_pmpro_remove_description_from_checkout_page");
@strangerstudios
strangerstudios / gist:2035922
Created March 14, 2012 11:37
Using WordPress HTTPS with Paid Memberships Pro
<?php
/*
Some WordPress HTTPS Fixes
In general, if you are using Paid Memberships Pro, you do not want to use the WordPress HTTPS plugin. PMPro will also secure your links.
If you are still receiving SSL errors on your checkout page, try setting the "nuclear" option on the Payment Gateway and SSL settings page of PMPro (v 1.3.19+)
If you want to continue using WordPress HTTPS for some reason, add this code to your theme's functions.php or somewhere else to force Paid Memberships Pro
to follow WordPress HTTPS' rules for redirecting, etc.
*/
//if WordPress HTTPS is activated allow their force_ssl custom field to replace the besecure one
function pmpro_WordPressHTTPSForceSSL($besecure)
@strangerstudios
strangerstudios / gist:1974258
Created March 4, 2012 18:20
Samples Checkout Template for Paid Memberships Pro
<?php
/*
Template Name: Buy
*/
/*
To make a checkout template for your site and PMPro.
1. Create a template page based on your page.php, single,php, index.php, etc.
2. Find the area where the post_content usually goes.
@strangerstudios
strangerstudios / gist:1389944
Created November 23, 2011 21:17
Paid Memberships Pro Extra Checkout/Profile Fields Example
<?php
/*
Adding First and Last Name to Checkout Form
*/
//add the fields to the form
function my_pmpro_checkout_after_password()
{
if(!empty($_REQUEST['firstname']))
$firstname = $_REQUEST['firstname'];