• James

    (@outrankjames)


    Hey Guys,

    There is something wrong with the latest update on WooCommerce, as it broke the checkout – I didnt get time to do any further investigation as it was a live running website, so just disabled the plugin, but seemed to affect just the checkout and basket pages.

    Is there a way to disable this loading on certain pages (i.e. we’re not bothered about the delayed loading on things like a WooCommerce Checkout and WooCommerce Basket pages)

Viewing 1 replies (of 1 total)
  • Plugin Author Aleksandr Guidrevitch

    (@aguidrevitch)

    HI @outrankjames,

    Would you mind sharing your problematic page url so I can check what’s wrong.

    1. Are you using Complianz?
    2. To disable plugin on certain pages, you can use wpmeteor_enabled filter, somewhere in you theme you can put the following code (NOT VERIFIED TO WORK):

      add_filter('wpmeteor_enabled', function ($value) {
      ?? ? ? ? ? //checking for woocommerce
      ? ? ? ? ? if (function_exists('wc_get_cart_url') &&.
      ? ? ? ? ? ? ? function_exists('wc_get_checkout_url') &&
      ? ? ? ? ? ? ? ? function_exists('wc_get_endpoint_url')) {
      ? ? ? ? ? ? ? ? $home_url = home_url();
      ? ? ? ? ? ? ? ? $current_url = preg_replace('/\?.*/i', '', $url->get_url());
      ? ? ? ? ? ? ? ? //comparing with cart url
      ? ? ? ? ? ? ? ? if (wc_get_cart_url() != $home_url && wc_get_cart_url() == $current_url) {
      ? ? ? ? ? ? ? ? ? ? return false;
      ? ? ? ? ? ? ? ? }
      ? ? ? ? ? ? ? ? //comparing with checkout url
      ? ? ? ? ? ? ? ? if (wc_get_checkout_url() != $home_url && wc_get_checkout_url() == $current_url) {
      ? ? ? ? ? ? ? ? ? ? return false;
      ? ? ? ? ? ? ? ? }
      ? ? ? ? ? ? ? ? //comparing with new order url
      ? ? ? ? ? ? ? ? $order_received_url = wc_get_endpoint_url('order-received', null, wc_get_checkout_url());
      ? ? ? ? ? ? ? ? if ($order_received_url != $home_url && strpos($current_url, $order_received_url) !== false) {
      ? ? ? ? ? ? ? ? ? ? return false;
      ? ? ? ? ? ? ? ? }
      ? ? ? ? ? ? ? ? //comparing with my-accoount url
      ? ? ? ? ? ? ? ? $my_account_url = get_permalink(wc_get_page_id('myaccount'));
      ? ? ? ? ? ? ? ? if ($my_account_url && $my_account_url != $home_url && $my_account_url == $current_url) {
      ? ? ? ? ? ? ? ? ? ? return false;
      ? ? ? ? ? ? ? ? }
      ? ? ? ? ? ? }
      return true;
      });

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.