Last active
October 12, 2023 20:07
-
-
Save andrewlimaza/a1c5e2b2d852e80702d08da35aef5295 to your computer and use it in GitHub Desktop.
Credit Card Icons For Paid Memberships Pro Checkout.
This file contains 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 | |
/** | |
* 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