Last active
October 10, 2020 19:52
-
-
Save bolderelements/ea73ad5ed0e295e2772fbe3b82560596 to your computer and use it in GitHub Desktop.
Add a column to the Table of Rates
This file contains hidden or 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
/** | |
* 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