Logan Graham
Forum Replies Created
-
You can remove the hook that WC uses like so:
remove_action( 'woocommerce_add_to_cart', [ WC()->cart, 'calculate_totals' ], 20 );However, if you have any sort of ‘mini cart’ that’s being displayed in the header, sidebar, etc, then that will likely call the same function before it’s output to make sure the end user is getting the most up-to-date calculation / rates. Otherwise, the user will experience a minor delay while visiting the cart page as it will have to retrieve those rates so they can be shown to the user. I would still advise testing that thoroughly to make sure it works with your system / setup.
Using that filter itself would not. WC will check to see if your package has changed vs the cached rates – and if it has – re-run the function that calculates shipping per package. However, if you have Shipping Debug Mode on it will not cache rates. This is toggled via (the dashboard)
WooCommerce -> Settings -> Shipping -> Shipping Options -> "Enable Debug Mode".If your WooCommerce installation is up to date, they’ve actually become quite good about caching returned rates and only recalculating that – via the
calculate_totalscart function – when the cart or address has changed. Unless there’s a rogue plugin or addon that’s causing it to run that function on every page WC itself shouldn’t be requesting those updated totals.As far as fixing it on every AJAX load, the code snippet and instructions I put above should resolve that atleast for the R+L plugin. You would have to see what is calling the UPS update separately – whether that plugin specifically or whatever might be running
calculate_totals.Forum: Plugins
In reply to: [WP Lazy Loaded Images] How to disable on some images?Flobogo, I really appreciate your assistance in testing / debugging this. Using your home page, I think I was able to solve the issue.
If you’re able, would you mind downloading the below version and giving it a shot?
https://downloads.wp.xz.cn/plugin/wp-lazy-loaded-images.1.4.0.zip
I’ve also added a noscript fallback so this can be used for visitors who might not have Javascript enabled.
- This reply was modified 9 years, 4 months ago by Logan Graham.
Forum: Plugins
In reply to: [WP Lazy Loaded Images] How to disable on some images?Must have a lot of traffic! You can embed 30 lines or so here if you would like. That should give enough to debug with.
Forum: Plugins
In reply to: [WP Lazy Loaded Images] How to disable on some images?If you have error logging enabled on the server, in the root of your WordPress install directory there should be a ‘error_log’ file. If you could try to find any “fatal” errors in it or send me the whole file I could try to debug that for you.
Forum: Plugins
In reply to: [WP Lazy Loaded Images] How to disable on some images?Are you able to provide some error logs, and which version of PHP you’re using?
Forum: Plugins
In reply to: [WP Lazy Loaded Images] German umlauts like Ü (ue) are destroyed!Actually, I think I’ve found the issue. Mind giving this version a shot?
Forum: Plugins
In reply to: [WP Lazy Loaded Images] German umlauts like Ü (ue) are destroyed!Interesting. You should be able to download an older version (1.2.1) while I take a look into this for you and troubleshoot the issue.
Forum: Plugins
In reply to: [WP Lazy Loaded Images] Plugin remove Image classes like alignrightLukas, this should be resolved with the newest version that you can download here and test, if you would like. I’ll be rolling this out in the next day or so.
Forum: Plugins
In reply to: [WP Lazy Loaded Images] How to disable on some images?Mind downloading a copy of version 1.3.0 here and giving it a shot on a development site? This should add support for the
data-no-lazyattribute so you can disable it on a per-image basis inside the post-content area.Forum: Plugins
In reply to: [WP Lazy Loaded Images] How to disable on some images?Hmm. Valid point, I can add a data attribute to do this. You’re trying to skip lazy loading for images inside the content area of a page / post – or inside a theme?
Forum: Plugins
In reply to: [WP Lazy Loaded Images] Plugin remove Image classes like alignrightHey Lukas! Thanks for reporting the bug. I’ll make sure to transfer those over to the newly generated image. Currently, it’s finding the image ID for embedded images so I can replace it and know dimensions and whatnot. If you would like, you can disable this functionality (where it filters images inside
the_content) by commenting out line #28 in thelazy-loaded-images.phpfile while I work on a fix for you.Noahj,
That is correct. After the release of this plugin, 2.4.x was released which had this functionality baked in natively. Prior to that, there was little to no support for large E-Commerce stores.