This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Update to the GADWP / ExactMetrics Lite tracking code for custom dimension for Membership Level | |
* | |
*/ | |
function my_pmpro_membership_level_exactmetrics_frontend_tracking_options_analytics_end( $options ) { | |
// Get the value to track for the current user. | |
if ( is_user_logged_in() && function_exists( 'pmpro_getMembershipLevelForUser' ) ) { | |
// Get the current users's membership level ID. | |
$current_user_membership_level = pmpro_getMembershipLevelForUser( get_current_user_id() ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pmpro_advanced_levels layout='compare_table' compare='<a href="/item-1/">Item 1</a>,1,1;<a href="/item-2/">Item 2</a>,0,1'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Show today's date before the content of the Terms of Service page at 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/ | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Always redirect user to referrer after log in if no other redirects are set. | |
* | |
*/ | |
function login_redirect_to_referrer( $redirect_to, $request, $user ) { | |
// If already redirecting, do that. | |
if ( ! empty( $redirect_to ) ) { | |
return $redirect_to; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom fields at membership checkout for just state. | |
* | |
*/ | |
function just_states_pmprorh_init() { | |
global $pmpro_states; | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom fields at membership checkout for support ticket. | |
* | |
* Requires: Paid Memberships Pro, Register Helper Add On. | |
* | |
* 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Stripe gateway Membership Checkout specific styles. */ | |
.pmpro_checkout_gateway-stripe form.pmpro_form #pmpro_payment_information_fields .pmpro_checkout-fields, | |
.pmpro_billing_gateway-stripe form.pmpro_form #pmpro_payment_information_fields .pmpro_checkout-fields { | |
display: -ms-grid; | |
display: grid; | |
-ms-grid-rows: auto 1em auto 1em auto; | |
grid-template-areas: | |
"AccountNumber AccountNumber" | |
"Expiry CVV" | |
"DiscountCode DiscountCode"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Allow members to upload their avatar using a Register Helper field during checkout or on the Member Profile Edit page. | |
* | |
* Requires: Paid Memberships Pro, Register Helper Add On. | |
* | |
* 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/ |