Last active
April 10, 2019 01:46
-
-
Save filipecsweb/44307082c2cf941da046 to your computer and use it in GitHub Desktop.
Add custom column to shop_order post type
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 | |
/** | |
* Add custom column to shop_order post type | |
* | |
* @param $columns array Array of all registered columns. | |
* | |
* @return array $new_columns | |
*/ | |
function add_custom_column_to_shop_order( $columns ) { | |
$new_columns = is_array( $columns ) ? $columns : array(); | |
$new_columns['software_key'] = __( 'Chave' ); | |
return $new_columns; | |
} | |
add_filter( 'manage_edit-shop_order_columns', 'add_custom_column_to_shop_order' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment