$js_version = filemtime(plugin_dir_path(__FILE__) . 'js/script.js');
$css_version = filemtime(plugin_dir_path(__FILE__) . 'css/style.css');
$timestamp = time();
wp_register_style( 'style', plugin_dir_url(__FILE__).'css/style.css', false, $timestamp );
wp_enqueue_style('style');
wp_enqueue_script( 'custom_js', plugin_dir_url(__FILE__).'js/script.js', array( 'signature' ), $timestamp, true );
Hi I'm trying to load in a js/css version number in the filepath, so that it does not keep loading old css/js for users, when I update the plugin (it's files). It shows the correct timestamp as ?ver=13434 etc. But it does not update the css/js. Any idea why? I can clear my own cache, but I want it to work on any machine