Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kimcoleman/438b2fca4cff932b68e22e547f2afaf2 to your computer and use it in GitHub Desktop.
Save kimcoleman/438b2fca4cff932b68e22e547f2afaf2 to your computer and use it in GitHub Desktop.
Using the pmpro_paypal_button_image filter to change the PayPal button image on the PMPro checkout page.
<?php
/**
* Change the PayPal button image on the Paid Memberships Pro - Membership Checkout page.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_paypal_button_image( $url ) {
return 'https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-large.png';
}
add_filter( 'pmpro_paypal_button_image', 'my_pmpro_paypal_button_image' );
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Change the PayPal Button on Membership Checkout" at Paid Memberships Pro here: https://www.paidmembershipspro.com/change-the-paypal-button-on-membership-checkout/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment