Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created October 19, 2018 11:00
Show Gist options
  • Save andrewlimaza/127fad0a2a2aea5fa5a2abf1fba7b963 to your computer and use it in GitHub Desktop.
Save andrewlimaza/127fad0a2a2aea5fa5a2abf1fba7b963 to your computer and use it in GitHub Desktop.
Load custom CSS for Membership Checkout for specific level - Paid Memberships Pro
<?php
/**
* Load custom CSS on checkoutpage for specific membership level in Paid Memberships Pro.
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function load_css_for_level_checkout(){
global $pmpro_pages;
if ( is_page( $pmpro_pages['checkout'] ) && isset( $_REQUEST['level'] ) == '1' ) {
?>
<style type="text/css">
#other_discount_code_p {display: none;}
#other_discount_code_tr {display: table-row !important;}
</style>
<?php
}
}
add_action( 'wp_footer', 'load_css_for_level_checkout', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment