• Resolved KS

    (@karl19)


    Hello, excellent plugin, just what I was looking for! Thanks for making it available, really appreciate it.

    The one issue we are having is on the checkout page, where it’s loading http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css?ver=3.9.2. The site we’re building is for the Chinese market and loading anything via Google is crippling these days.

    I was wondering if it’s possible to use a hook/filter to load this file from the server instead?

    https://wordpress.org/plugins/woocommerce-poor-guys-swiss-knife/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author ulihake

    (@ulih)

    Hello karl19.

    Thanks for your feedback. Next update will include the possibility to call a local version via filter.

    The filter is named wcpgsk_jquery_ui and the second parameter holds a pointer to the local version which can be used to replace the return value.

    Regards.
    uh

    Thread Starter KS

    (@karl19)

    Hi Uli, that sounds excellent, great that it’ll be an option in an upcoming version.

    Thanks again for the plugin!

    Plugin Author ulihake

    (@ulih)

    The option is already available inside 1.9.8

    Place a filter function inside your theme functions file for example with the following code:

    add_filter( 'wcpgsk_jquery_ui', 'wcpgsk_jquery_ui_local', 10, 2 );
    function wcpgsk_jquery_ui_local( $remote, $local ) {
        return $local;
    }

    That’s it.
    Regards.
    uh

    Thread Starter KS

    (@karl19)

    That’s great, tested it now and seems to work fine – thanks!

    add_filter( 'wcpgsk_jquery_ui', 'wcpgsk_jquery_ui_local', 10, 2 );
    function wcpgsk_jquery_ui_local( $remote, $local ) {
        $local = get_bloginfo('template_url').'/css/jquery-ui.css';
        return $local;
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google API URL’ is closed to new replies.