Change the PayPal Icon on Checkout Page

A simple function to solve a common problem: “How can I alter the PayPal icon?” Here’s a fast PHP fix if you’re having the same issue.

add_filter( 'woocommerce_paypal_icon', 'codeithub_replace_paypal_icon' );
  
function codeithub_replace_paypal_icon() {
   return 'https://image.flaticon.com/icons/png/512/1145/1145485.png';
}

Before:

Default PayPal Icon

After:

Changed PayPal Icon
See also  WordPress disable srcset responsive images

Leave a Reply

Your email address will not be published. Required fields are marked *