Advertisement
daymobrew

Woocommerce Checkout Manager wp_enqueue_script

Nov 9th, 2014
636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.35 KB | None | 0 0
  1. --- woocommerce-checkout-manager.php.orig   2014-10-07 22:16:54.000000000 +0100
  2. +++ woocommerce-checkout-manager.php    2014-11-09 09:06:56.481818400 +0000
  3. @@ -49,8 +49,7 @@
  4.  add_action( 'admin_init', 'wccs_register_setting' );
  5.  } else { // non-admin enqueues, actions, and filters
  6.  // hook to get option values and dynamically render css to support the tab classes
  7. -wp_enqueue_script('jquery-ui-datepicker');
  8. -wp_enqueue_style( 'jquery-ui-style', (is_ssl()) ? 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' : 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
  9. +add_action('wp_enqueue_script', 'wccs_non_admin_scripts');
  10.  }
  11.  // action function for above hook
  12.  function wccs_admin_menu() {
  13. @@ -60,6 +59,11 @@
  14.  function wccs_register_setting() {
  15.  register_setting( 'wccs_options', 'wccs_settings', 'wccs_options_validate' );
  16.  }
  17. +function wccs_non_admin_scripts() {
  18. +wp_enqueue_script('jquery-ui-datepicker');
  19. +wp_enqueue_style( 'jquery-ui-style', (is_ssl()) ? 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' : 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css' );
  20. +}
  21. +
  22.  // fc_settings_page() displays the page content
  23.  function wccs__options_page() {
  24.      //must check that the user has the required capability
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement