title: How to change logo of payment option in WooCommerce / WooCommerce PayPal Payments plugin
body: <p>I have a plugin called <code>WooCommerce PayPal Payments</code> which allows <code>PayPal</code> payments in <code>WooCommerce</code>. With this plugin, they also have an option for <code>credit card</code> payments. See below:</p>
  <p><a href="https://i.stack.imgur.com/dnydr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dnydr.png" alt="enter image description here" /></a></p>
  <p>All of this renders the following on the front end:</p>
  <p><a href="https://i.stack.imgur.com/k9oEJm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k9oEJm.png" alt="enter image description here" /></a></p>
  <p>Now, I'm trying to change the <code>AMEX</code> logo to a custom logo.</p>
  <p>I've seen many articles which show how to change the <code>PayPal</code> logo, <a href="https://www.themelocation.com/how-to-replace-default-paypal-logo-on-woocommerce-checkout-page/" rel="nofollow noreferrer">such as this one</a>, but haven't seen any that mention how to change the AMEX, MasterCard or other logo.</p>
  <p>For example, I've used this hook to change the <code>PayPal</code> logo:</p>
  
  <pre class="lang-html prettyprint-override"><code>add_filter( 'woocommerce_gateway_icon', 'remove_what_is_paypal', 10, 2 );
  
  function remove_what_is_paypal( $icon_html, $gateway_id ) {
    if( 'paypal' == $gateway_id ) {
      $paypal_logo = get_template_directory_uri().&quot;/assets/build/vectors/paypal-logo-original.svg&quot;;
      $icon_html = &quot;&lt;img class='checkoutPage__paypal' src=&quot;.$paypal_logo.&quot;' alt='PayPal logo'&gt;&quot;;
    }
    return $icon_html;
  }
  </code></pre>
  <p>How do I change the <code>AMEX</code> logo?</p>