Guest User

Untitled

a guest
Dec 12th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. Can I change the credit card icons?
  2.  
  3. The icon used is filterable by adding code to your theme functions.php file. Replace the image URL as follows.
  4.  
  5. For Braintree:
  6.  
  7. add_filter( 'woocommerce_braintree_icon', 'custom_woocommerce_braintree_icon' );
  8.  
  9. function custom_woocommerce_braintree_icon() {
  10. return 'https://yoursite.com/icon.png';
  11. }
  12.  
  13. For Paypal Advanced:
  14.  
  15. add_filter( 'woocommerce_paypal_advanced_icon', 'custom_woocommerce_paypal_advanced_icon' );
  16.  
  17. function custom_woocommerce_paypal_advanced_icon() {
  18. return 'https://yoursite.com/icon.png';
  19. }
  20.  
  21. For PayPal Credit Card (REST):
  22.  
  23. add_filter( 'woocommerce_paypal_credit_card_rest_icon', 'custom_woocommerce_paypal_credit_card_rest_icon' );
  24.  
  25. function woocommerce_paypal_credit_card_rest_icon() {
  26. return 'https://yoursite.com/icon.png';
  27. }
  28.  
  29.  
  30. For PayPal Express Checkout:
  31.  
  32. add_filter( 'woocommerce_paypal_express_icon', 'custom_woocommerce_paypal_express_icon' );
  33.  
  34. function custom_woocommerce_paypal_express_icon() {
  35. return 'https://yoursite.com/icon.png';
  36. }
  37.  
  38. For PayPal Express Checkout:
  39.  
  40. add_filter( 'woocommerce_paypal_express_icon', 'custom_woocommerce_paypal_express_icon' );
  41.  
  42. function custom_woocommerce_paypal_express_icon() {
  43. return 'https://yoursite.com/icon.png';
  44. }
  45.  
  46. For PayPal Website Payments Pro (DoDirectPayment) :
  47.  
  48. add_filter( 'woocommerce_paypal_pro_icon', 'custom_woocommerce_paypal_pro_icon' );
  49.  
  50. function custom_woocommerce_paypal_pro_icon() {
  51. return 'https://yoursite.com/icon.png';
  52. }
  53.  
  54. For PayPal Payments Pro 2.0 (PayFlow) :
  55.  
  56. add_filter( 'woocommerce_paypal_pro_payflow_icon', 'custom_woocommerce_paypal_pro_payflow_icon' );
  57.  
  58. function custom_woocommerce_paypal_pro_payflow_icon() {
  59. return 'https://yoursite.com/icon.png';
  60. }
Add Comment
Please, Sign In to add comment