Tagged: x
-
AuthorPosts
-
July 30, 2016 at 3:20 pm #1110358
Hi there,
Are we discussing the PayPal image, right? Then it’s nothing to do with CSS we’re discussing.
Another set of questions just to confirm,
1. I can see from the cart page the difference, and it’s the PayPal image. The question is, which of the two is correct. Is it the page with no Paypal button, or is it the one that has it? In short, should the image be displayed on both or make them hidden?
2. Similar question as #1, which image should be displayed on both site’s checkout, should be the small one or the bigger one?
Again, it’s nothing to do with above CSS, that’s the reason why both sites are different even if they have the same code 🙂
And please provide your FTP login credentials as well.
Thanks!
July 31, 2016 at 4:55 am #1110828This reply has been marked as private.July 31, 2016 at 4:04 pm #1111194Hi there,
I went ahead and added this code to Admin > Appearance > Customizer > Custom > Javascript
jQuery('label[for="payment_method_ppec_paypal"] img').attr('src','https://www.paypalobjects.com/webstatic/mktg/Logo/AM_mc_vs_ms_ae_UK.png').attr('style','max-height:none!important;');
Previous code works too, you just didn’t clear the cache 🙂
Thanks!
July 31, 2016 at 8:03 pm #1111407I have cleared browser cache, cleared all the caches on wwww.protectiondogsuk.co.uk and still does not work. How are you clearing the cache because I cannot get this to work
August 1, 2016 at 12:17 am #1111571Hi Jack,
We’ll try another option.
Kindly install and activate a child theme.
https://community.theme.co/kb/how-to-setup-child-themes/
Then add this in your child theme’s functions.php file located at wp-content/themes/x-child/functions.php
function replacePayPalIcon($iconUrl) { return 'https://www.paypalobjects.com/webstatic/mktg/Logo/AM_mc_vs_ms_ae_UK.png'; } add_filter('woocommerce_paypal_icon', 'replacePayPalIcon');
The contents of the file will look like this.
http://screencast.com/t/7wYzCoMrMf
Hope that helps
August 1, 2016 at 2:51 am #1111692I’ve done exactly as you say. Installed child theme and added
function replacePayPalIcon($iconUrl) {
return ‘https://www.paypalobjects.com/webstatic/mktg/Logo/AM_mc_vs_ms_ae_UK.png’;
}add_filter(‘woocommerce_paypal_icon’, ‘replacePayPalIcon’);
to functions.php
Unfortunately it does not work. Please check I have added it correctly you have the login details.
August 1, 2016 at 4:21 am #1111744Hi there,
Looks like that PayPal image is added by javascript. And executed right after my added code randomly, hence, there are times that it works and not.
I updated the code to this,
jQuery( function($) { change_paypal_image(); $(document).ready( function() { change_paypal_image(); setTimeout( function() { change_paypal_image(); }, 1000 ); setTimeout( function() { change_paypal_image(); }, 700 ); setTimeout( function() { change_paypal_image(); }, 500 ); } ); $(window).load ( change_paypal_image ); function change_paypal_image() { $('label[for="payment_method_ppec_paypal"] img').attr('src','https://www.paypalobjects.com/webstatic/mktg/Logo/AM_mc_vs_ms_ae_UK.png').attr('style','max-height:none!important;'); } });
As you’d noticed the image is already changed on load, but switch back to small image again. So this updated code will switch it to bigger image over and over.
Please clear your browser cache and check it again.
Please, this URL http://www.protectiondogsuk.co.uk/wp-admin/admin.php?page=stats&noheader&proxy&chart=admin-bar-hours-scale makes it slow. Try disabling your admin bar.
Thanks!
August 1, 2016 at 4:34 am #1111758It works!!! Thanks for all your staff efforts
I don’t understand this however and does it slow my site down?
“Please, this URL http://www.protectiondogsuk.co.uk/wp-admin/admin.php?page=stats&noheader&proxy&chart=admin-bar-hours-scale makes it slow. Try disabling your admin bar.”
Regards
Jack
August 1, 2016 at 7:08 am #1111866Hi there,
Yes, it’s slow on my end. Or maybe just on my end. Your page took 12 seconds to load because of that image (chart bars)
And you’re so much welcome 🙂
August 1, 2016 at 8:18 am #1111937I’ve tested on Google Page insights Mobile 71 Desktop 87
Pingdom faster than 92% of websites from Stockholm ServerAugust 1, 2016 at 9:29 am #1112029Hi Jack,
Your website is loading fine on my end, speed is not bad at all.
Let us know if you need further help with anything else,
Joao
-
AuthorPosts