Forked from andrewlimaza/add-credit-card-image-to-checkout.php
Last active
October 12, 2023 20:10
-
-
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.
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 | |
/** | |
* 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