Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save northernbeacheswebsites/ede83fae45044156f5e3 to your computer and use it in GitHub Desktop.
Save northernbeacheswebsites/ede83fae45044156f5e3 to your computer and use it in GitHub Desktop.
// add new item type (working)
function add_sizeproduct_line_item_type( $types = array() ) {
$types = array_merge( $types, array( 'sizeproduct' => si__( 'Size Product' ) ) );
return $types;
}
add_filter( 'si_line_item_types', 'add_sizeproduct_line_item_type' );
// replace new item types column 'rate' with 'Per SQM' (not working)
function add_persqm( $columns = array(), $type = 'sizeproduct' ) {
$replace = array( 1 => "Per SQM");
return $replace;
}
add_filter( 'si_line_item_columns', 'add_persqm' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment