Created
September 26, 2014 08:27
-
-
Save nielsvr/54bb0d5ae6214a2dde33 to your computer and use it in GitHub Desktop.
Setting the default customer note in WooCommerce to private
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function() { | |
if( jQuery("#order_note_type") ) { | |
jQuery('#order_note_type :nth-child(2)').prop('selected', true); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function admin_javascript_fixes_private_note($hook) { | |
if ( 'post.php' != $hook ) { | |
return; | |
} | |
wp_enqueue_script( 'custom-admin-js', get_stylesheet_directory_uri() . '/admin.js' ); // change this | |
} | |
add_action( 'admin_enqueue_scripts', 'admin_javascript_fixes_private_note' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment