Skip to content

Instantly share code, notes, and snippets.

@bolderelements
Last active October 10, 2020 19:52
Show Gist options
  • Save bolderelements/ea73ad5ed0e295e2772fbe3b82560596 to your computer and use it in GitHub Desktop.
Save bolderelements/ea73ad5ed0e295e2772fbe3b82560596 to your computer and use it in GitHub Desktop.
Add a column to the Table of Rates
/**
* Add a column to the Table of Rates
*
* @return array
*/
function betrs_add_column( $columns ) {
// temporarily unset the last column (sort)
unset( $columns['sort'] );
// setup new column
$columns['provider'] = __( 'Shipping Provider', 'be-table-ship' );
// add sort column back
$columns['sort'] = '';
return $columns;
}
add_filter( 'betrs_shipping_table_columns', 'betrs_add_column', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment