AndrwCris
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: WP REST API Nonce check failing with 403 errorActually just realised it was a typo … wp_rest not wp-rest!
'nonce' => wp_create_nonce('wp_rest')
NOT as I had it…
'nonce' => wp_create_nonce('wp-rest')
- This reply was modified 7 years ago by AndrwCris.
Forum: Plugins
In reply to: [WooCommerce] JQuery help after country selectionHi Superkot,
Lol OK I’d gone with that approach based on what I read here – https://github.com/woocommerce/woocommerce/issues/12409 and presumed I need to run something similar in an attached js file…
However, your solution worked totally and is just what I need thankyou (with very slight tweak to jQuery selector).
The full code included in my functions.php file of the child theme is shown below in case it’s of use to anyone else and many thanks for the jQuery solution ??
add_filter( 'woocommerce_billing_fields', 'wc_npr_filter_phone', 10, 1 ); function wc_npr_filter_phone( $address_fields ) { $wc = WC(); $country = $wc->customer->get_country(); if($country !== 'GB'){ $address_fields['billing_phone']['required'] = true; } return $address_fields; } function hide_phone_uk_script() { if(is_checkout()) { ?> <script> jQuery( '#billing_country' ).change( function () { var customercountry = jQuery('#billing_country').val(); if (customercountry == "GB") { jQuery("#billing_phone_field > label > abbr").hide(); } else { jQuery("#billing_phone_field > label > abbr").show(); } }); </script> <?php } } add_action( 'wp_footer', 'hide_phone_uk_script' );
Forum: Plugins
In reply to: [WooCommerce] JQuery help after country selectionI’ve done some more work on this and getting a bit closer
jQuery( document ).ajaxComplete(function() { jQuery( ":input.country_to_state" ).change(function() { if (jQuery("#select2-billing_country-container").text()==="United Kingdom (UK)") { alert("UK selected") //jQuery("#billing_phone_field > label > abbr").hide(); } else { alert("Non UK Country Selected") //jQuery("#billing_phone_field > label > abbr").show(); } }) }); //almost there but not 'clearing' if selecting one after another
But as noted in the comment if I select say 3 countires one after another I have to click OK 3 times so not quite right. Also if I comment out the alerts and uncomment the jQuery lines that doesn’t seem to work although I’m hoping thats linked the the above as they do work as single commands in the console…
Hi Ruslan,
I’ve got the same issue, only seems to affect Chrome and is fine on Firefox? OS is Win 10 and its Chrome 54.
Thanks
Andrew
Forum: Plugins
In reply to: [Sidebar Widgets by CodeLights] flipbox back is empty in IE11I have this issue too, Win 10 IE 11.576.14393.0 update versions 11.0.38 – I don’t have access to any Win 7 machines anymore to test on but wonder if it’s something to do with the Win 10 version of IE – if that’s the case should affect a very small number of users as most Win 10 users will be using Edge….
- This reply was modified 8 years, 1 month ago by AndrwCris.
Forum: Plugins
In reply to: [WooCommerce] Move title above images on category pagesHi,
I’d slightly misunderstood what the code I had added was doing as it was only affecting individual products rather than categories and was actually working fine for what it was supposed to do.
I had a play around with hooks yesterday (new area for me so lots of trial and error) and found that adding
remove_action( ‘woocommerce_shop_loop_subcategory_title’, ‘woocommerce_template_loop_category_title’, 10 );
add_action( ‘woocommerce_before_subcategory’, ‘woocommerce_template_loop_category_title’, 10 );to the functions file sorted my issue.
Thanks for the pointer though, due to time pressure I’ll take the ‘quick fix’ for now but will get back to having a look at the templates as soon as I can.
Cheers
Andrew
Hi again Matt,
I changed the PHP version used by the site to 5.6 and it all seems to be working fine now ??
Regards
Andrew
Hi Matt,
Yes rest of the site works fine, just seems to be the firewall that won’t switch on.
PHP Version 5.2.6
System Linux lin240.gridhost.co.uk 2.6.32.21-grsec #6 SMP Fri May 20 17:37:06 BST 2011 x86_64
Server API CGIFilesize of the config.php file is 0 and the permission is 0644 (on everything in that file).
Regards
Andrew
Forum: Themes and Templates
In reply to: Copy content of module to other pages – DIviHi Julia,
As far as I know it isn’t really possible to do it in a simple fashion although perhaps it might be a new feature with Divi 2.0 with luck…
However, there is a kind of workaround listed in the support forum here that might help you – https://www.elegantthemes.com/forum/viewtopic.php?f=187&t=292548&p=1602789&hilit=copy+module#p1602789
Regards
Andrew
Forum: Themes and Templates
In reply to: Hover color only changes part of text in ChromeHi Rachel, back home now and have tested on my laptop and all fine on there too so, as you say, hopefully just a local problem ??
Forum: Themes and Templates
In reply to: Hover color only changes part of text in ChromeI know this doesn’t help solve it but the color change works fine for me in the same version of chrome 31.0.1650.63 on this page – https://reclaimedhome.com/blog/ ?
Have you tried clearing your browser cache?
I would think it would be quite easy to implement code wise and would probably be really good for making WP more secure by default for future installs with relatively little effort.
I don’t know enough of the code to know if would have any knock on mind…
Might be worth suggesting at https://make.www.ads-software.com/core/ though?
I’ve started having a look at BWP and Wordfence and the main difference I see on the scans which I rightly or wrongly consider important are the checks below.
The admin user still exists. Click here to rename admin.
A user with id 1 still exists. Click here to change user 1’s ID.
Your table prefix should not be wp_. Click here to rename it.As above though I’ve installed both on a couple of sites and they seem to be working fine together.
Thanks
Andrew