WC()->plugin_url()
is basically a wrapper for the core function plugins_url()
. That functions return value is filtered. return apply_filters( 'plugins_url', $url, $path, $plugin );
So you should be able to add a filter to that hook that returns the initial value if $plugin
isn’t woocommerce, then checks if the path or URL leads to one of the scripts you’re trying to replace and sends the appropriate value on from there.