Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WooCommerce Incompatibility #10

Open
sidati opened this issue Jan 3, 2016 · 0 comments
Open

WooCommerce Incompatibility #10

sidati opened this issue Jan 3, 2016 · 0 comments

Comments

@sidati
Copy link

sidati commented Jan 3, 2016

Hello there,

Because WooCommerce use the HTTP prefix // instead on HTTP:// or HTTPS://, so WP Minify Fix, ignore them, exactly in local_version function (line 528).

So please fix it by add the HTTP or HTTPS protocols to the url depending on get_option('siteurl'), maybe something like :

    function local_version($url) {
        $site_url = trailingslashit(get_option('siteurl'));
        if (preg_match('#^//#', $url)) {
            $url = 'http'.(preg_match('#^https://#', $site_url) ? 's:' : ':').$url;
        }
        $url = str_replace($site_url, '', $url); // relative paths only for local urls
        //$url = preg_replace('/^\//', '', $url); // strip front / if any
        $url = preg_replace('/\?.*/i', '', $url); // throws away parameters, if any
        return $url;
    }

Best,
Sidati

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant