Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Last active October 12, 2023 20:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andrewlimaza/a1c5e2b2d852e80702d08da35aef5295 to your computer and use it in GitHub Desktop.
Save andrewlimaza/a1c5e2b2d852e80702d08da35aef5295 to your computer and use it in GitHub Desktop.
Credit Card Icons For Paid Memberships Pro Checkout.
<?php
/**
* Add credit card icons to Paid Memberships Pro Checkout.
* Download the icons from https://www.paidmembershipspro.com/add-credit-cards-and-paypal-logos-to-checkout-when-using-paypal-gateway-or-add-paypal-express-add-on/
* Unzip the icons and copy the cc-horizontal.jpg into your PMPro Customizations Plugin.
* If you haven't setup the PMPro Customizations Plugin yet, follow this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* www.paidmembershipspro.com
*/
function pmpro_add_my_logos_to_checkout(){
global $pmpro_level;
if ( ! pmpro_isLevelFree( $pmpro_level ) ){
echo "<h3>Accepted Credit Cards</h3>";
echo "<img src='". plugins_url( 'cc-horizontal.jpg', __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