jordanwebdev
Forum Replies Created
-
Not sure, just saw it in the error logs. Is there anything else I can provide that would assist you?
Forum: Plugins
In reply to: [WooCommerce] Standard tax rates table does not update for US addressesCan anyone provide assistance? Perhaps this hasn’t been seen since it was moved?
Forum: Plugins
In reply to: [WooCommerce] Standard tax rates table does not update for US addressesWhy isn’t it Jetpack? It has to do with Jetpack’s automatic tax rate calculator (the one that becomes available only after linking the site through JetPack)
Forum: Plugins
In reply to: [WooCommerce] Standard tax rates table does not update for US addressesUpdate: As a test, I changed the Store address to a US-based one, and it worked when I entered an address in the same state. It did not work when I tried to ship to an address in another US State.
For Canadian addresses, it’s no problem no matter what address I put in. It works every time.
So how do I get it to work with a Canadian store address sending to US addresses?
- This reply was modified 4 years, 3 months ago by jordanwebdev.
Nevermind, this problem is happening on all browsers when logged out.
For anyone else experiencing this same issue, I’ve come up with a “solution”, though it’s a bit hacky, and you need to be able to modify your theme.
Basically, I think Safari is not reliably detecting the session. So, I created a tag to detect Safari, and set the currency to either equal the $_GET currency parameter (if it exists), or the default currency for my store. I then use JS to modify every link on the page.
Firstly, I added this hook after my starting body tag
<?php do_action('after_body_start'); ?>
Then in another php file, I hooked into it (this can be done in functions.php, or a file linked from there). Replace ‘MY_DEFAULT_CURRENCY’ with yours.
<?php add_action('after_body_start', 'jwd_add_safari_tag'); function jwd_add_safari_tag() { $_ch_curr = $_GET['currency'] ?? 'MY_DEFAULT_CURRENCY'; $is_safari = strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') && !strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome'); if ($is_safari) : ?> <div class="js-is-safari" data-curr="<?php echo esc_attr($_ch_curr); ?>"></div> <?php endif; ?> <?php }; ?>
In My JS, I look for the Safari element. If it exists, add the currency parameter to every link on the page. I also did a check to determine if the URL contains some text from the website’s url, as a way to prevent adding it to external URLs or links like “#” (replace ‘my domain text’ with yours – something like ‘example’ for ‘www.example.com’.
// Safari fix (add parameter to URLs) let is_safari = $('.js-is-safari').length > 0; if (is_safari) { let curr = $('.js-is-safari').data('curr'); $('a').each(function() { let href = $(this).prop('href'); if (!href.includes('my domain text')) { // Continue return; } let new_href = href; if (href.includes('?')) { new_href = href + "¤cy=" + curr; } else { new_href = href + "?currency=" + curr; } $(this).attr('href', new_href); }); }
- This reply was modified 4 years, 4 months ago by jordanwebdev.
- This reply was modified 4 years, 4 months ago by jordanwebdev.
- This reply was modified 4 years, 4 months ago by jordanwebdev.
Thanks. Tried those settings. No luck in Safari still, but FireFox and Chrome are fine. Using autoptimize and wp-optimize for cache plugins.
I seem to be having the same issue, but only in Safari. It’s fine in other browsers. Switch the currency, then go to another page and the currency switches back on its own.
Forum: Plugins
In reply to: [Autoptimize] Avoid Bad Requests GT Metrix issueThanks, I ended up deactivating Autoptimize, and realized it was a sass import to a non-existent path.
Forum: Plugins
In reply to: [Autoptimize] Avoid Bad Requests GT Metrix issueThat’s odd, when I test it gives me that error. Maybe it only happens sometimes. Any suggestions on how I can make it consistent? I just tested now and got the issue.
- This reply was modified 4 years, 7 months ago by jordanwebdev.
Forum: Plugins
In reply to: [Autoptimize] Autoptimize uninstall breaking siteJust a guess, but try going to the wp-content folder > cache and delete the autoptimize directory. It may be an issue with a conflict with another cache plugin you may have running. Make a backup of your site before making these changes.
Forum: Plugins
In reply to: [Autoptimize] 404/410 responseI’m getting this error too with the latest version of AO installed and using the 404 option. I’m using this plugin in combination with wp-optimize. I tried clearing caches.
The following requests are returning 404/410 responses. Either fix the broken links, or remove the references to the non-existent resources.
“{MY_SITE}/wp-content/cache/autoptimize/css/4/index”
I am getting this issue too. It only appears when WP Optimize is enabled. It goes away when I remove the plugin and all residual files.
If I may, I have a request:
Could you please add an option to disable cached minified files for admin users? I believe this is how other plugins like Autoptimize do it. That way, it’s possible to view the work done on CSS and JS files while logged in, without having to turn off minification or reset the minified files each time.
It would also be nice to have a refresh minified files button in the wp-admin bar, in the purge all pages drop down.
- This reply was modified 4 years, 9 months ago by jordanwebdev.
I’ve been getting the same issue. Unfortunately that snippet didn’t resolve the issue in GTMetrix.
Perhaps this needs to be added to the plugin in an update?