Last active
February 23, 2020 08:49
-
-
Save klikdiva/8589c42be8fbd526e9daf787888afa54 to your computer and use it in GitHub Desktop.
Modify the parameters that are used to register the Woocommerce Product post type
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
/** | |
* Modify the parameters that are used to register the Woocommerce Product post type. | |
*/ | |
add_filter( 'woocommerce_register_post_type_product', 'so_26712459_post_type' ); | |
function so_26712459_post_type( $args ){ | |
$labels = array( | |
'name' => __( 'Activities', 'your-custom-plugin' ), | |
'singular_name' => __( 'Activity', 'your-custom-plugin' ), | |
'menu_name' => _x( 'Activities', 'Admin menu name', 'your-custom-plugin' ), | |
'add_new' => __( 'Add Activity', 'your-custom-plugin' ), | |
'add_new_item' => __( 'Add New Activity', 'your-custom-plugin' ), | |
'edit' => __( 'Edit', 'your-custom-plugin' ), | |
'edit_item' => __( 'Edit Activity', 'your-custom-plugin' ), | |
'new_item' => __( 'New Activity', 'your-custom-plugin' ), | |
'view' => __( 'View Activity', 'your-custom-plugin' ), | |
'view_item' => __( 'View Activity', 'your-custom-plugin' ), | |
'search_items' => __( 'Search Activity', 'your-custom-plugin' ), | |
'not_found' => __( 'No Activity found', 'your-custom-plugin' ), | |
'not_found_in_trash' => __( 'No Activities found in trash', 'your-custom-plugin' ), | |
'parent' => __( 'Parent Activity', 'your-custom-plugin' ) | |
); | |
$args['labels'] = $labels; | |
$args['description'] = __( 'This is where you can add new activities to your store.', 'your-custom-plugin' ); | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment