Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimcoleman/8375a6604a1d8ac67a91c43363565f5d to your computer and use it in GitHub Desktop.
Save kimcoleman/8375a6604a1d8ac67a91c43363565f5d to your computer and use it in GitHub Desktop.
Display credit card logos before the submit button on the Paid Memberships Pro Membership Checkout page.
<?php
/**
* Display credit card logos before the submit button on the Paid Memberships Pro Membership Checkout page.
*
* Download the icons from https://www.paidmembershipspro.com/add-credit-card-and-paypal-logos-to-checkout/
* Place the image file in the correct location according to your customizations structure.
*/
function pmpro_add_my_logos_to_checkout(){
global $pmpro_level;
if ( ! pmpro_isLevelFree( $pmpro_level ) ){
echo '<h2>Accepted Credit Cards</h2>';
echo '<img alt="Credit card logos for Visa, Mastercard, Discover, and American Express" style="max-width: 300px;" src="' . plugins_url( '/images/pay-with-credit-cards.png', __FILE__ ) .'" />';
}
}
add_action( 'pmpro_checkout_before_submit_button', 'pmpro_add_my_logos_to_checkout', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment