Last active
January 13, 2020 15:41
-
-
Save dancameron/e200438fa79378df235e to your computer and use it in GitHub Desktop.
Setting a new Line Item Default
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
<?php // don't include this line in your functions.php, since it already starts with it. | |
function _set_new_default_si_type( $types = array() ) { | |
unset( $types['service'] ); // remove the type you want to make a default | |
return array_merge( array( 'service' => __( 'Service', 'sprout-invoices' ) ), $types ); // add it back at the top of the list. | |
} | |
add_filter( 'si_line_item_types', '_set_new_default_si_type' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment