Skip to content

Instantly share code, notes, and snippets.

@pixelbart
Forked from InpsydeNiklas/functions.php
Created July 27, 2023 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pixelbart/3cb8c254ef515a7d0297dc702c106fb4 to your computer and use it in GitHub Desktop.
Save pixelbart/3cb8c254ef515a7d0297dc702c106fb4 to your computer and use it in GitHub Desktop.
display icon for ppcp-gateway in the checkout
function woocommerce_paypal_payments_gateway_icon( $icon, $id ) {
if ( $id === 'ppcp-gateway' ) {
return '<img src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png" alt="PayPal Payments" />';
} else {
return $icon;
}
}
add_filter( 'woocommerce_gateway_icon', 'woocommerce_paypal_payments_gateway_icon', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment