Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Last active July 30, 2022 07:19
Show Gist options
  • Save strangerstudios/43cac2cbcef66e7461b8 to your computer and use it in GitHub Desktop.
Save strangerstudios/43cac2cbcef66e7461b8 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.
/*
Add this code to your active theme's functions.php or a custom plugin
to change the PayPal button image on the PMPro checkout page.
*/
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');
@solhuebner
Copy link

Thank you for sharing

@wc3717
Copy link

wc3717 commented Jul 30, 2022

Getting this error when using it
`The snippet has been deactivated due to an error on line 10:

Cannot redeclare function my_pmpro_paypal_button_image.`

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