• When Hide on Cart & Checkout is enabled the frontend assets should not be enqueued.

    You have a check on footer() function that doesn’t allow content to be printed.

    php
    if ( ( get_option( '_woofc_hide_cart_checkout', 'no' ) === 'yes' ) && ( is_cart() || is_checkout() ) ) {
      return;
    }
    

    similar check should be applied in enqueue_scripts() function.

    Since frontend js is enqueued on the cart/checkout page my custom CSS selector which is an anchor tag doesn’t redirect to the cart page because JS is preventing the default event.

  • The topic ‘Disable frontend assets when Hide on Cart & Checkout is Enabled’ is closed to new replies.