Merge pull request #22380 from Prospress/fix/22261
register order auto drafts post status
This commit is contained in:
commit
1125a5d76d
|
@ -51,7 +51,8 @@ class WC_Post_Types {
|
|||
'product_type',
|
||||
apply_filters( 'woocommerce_taxonomy_objects_product_type', array( 'product' ) ),
|
||||
apply_filters(
|
||||
'woocommerce_taxonomy_args_product_type', array(
|
||||
'woocommerce_taxonomy_args_product_type',
|
||||
array(
|
||||
'hierarchical' => false,
|
||||
'show_ui' => false,
|
||||
'show_in_nav_menus' => false,
|
||||
|
@ -66,7 +67,8 @@ class WC_Post_Types {
|
|||
'product_visibility',
|
||||
apply_filters( 'woocommerce_taxonomy_objects_product_visibility', array( 'product', 'product_variation' ) ),
|
||||
apply_filters(
|
||||
'woocommerce_taxonomy_args_product_visibility', array(
|
||||
'woocommerce_taxonomy_args_product_visibility',
|
||||
array(
|
||||
'hierarchical' => false,
|
||||
'show_ui' => false,
|
||||
'show_in_nav_menus' => false,
|
||||
|
@ -81,7 +83,8 @@ class WC_Post_Types {
|
|||
'product_cat',
|
||||
apply_filters( 'woocommerce_taxonomy_objects_product_cat', array( 'product' ) ),
|
||||
apply_filters(
|
||||
'woocommerce_taxonomy_args_product_cat', array(
|
||||
'woocommerce_taxonomy_args_product_cat',
|
||||
array(
|
||||
'hierarchical' => true,
|
||||
'update_count_callback' => '_wc_term_recount',
|
||||
'label' => __( 'Categories', 'woocommerce' ),
|
||||
|
@ -120,7 +123,8 @@ class WC_Post_Types {
|
|||
'product_tag',
|
||||
apply_filters( 'woocommerce_taxonomy_objects_product_tag', array( 'product' ) ),
|
||||
apply_filters(
|
||||
'woocommerce_taxonomy_args_product_tag', array(
|
||||
'woocommerce_taxonomy_args_product_tag',
|
||||
array(
|
||||
'hierarchical' => false,
|
||||
'update_count_callback' => '_wc_term_recount',
|
||||
'label' => __( 'Product tags', 'woocommerce' ),
|
||||
|
@ -160,7 +164,8 @@ class WC_Post_Types {
|
|||
'product_shipping_class',
|
||||
apply_filters( 'woocommerce_taxonomy_objects_product_shipping_class', array( 'product', 'product_variation' ) ),
|
||||
apply_filters(
|
||||
'woocommerce_taxonomy_args_product_shipping_class', array(
|
||||
'woocommerce_taxonomy_args_product_shipping_class',
|
||||
array(
|
||||
'hierarchical' => false,
|
||||
'update_count_callback' => '_update_post_term_count',
|
||||
'label' => __( 'Shipping classes', 'woocommerce' ),
|
||||
|
@ -479,6 +484,14 @@ class WC_Post_Types {
|
|||
$order_statuses = apply_filters(
|
||||
'woocommerce_register_shop_order_post_statuses',
|
||||
array(
|
||||
'wc-auto-draft' => array(
|
||||
'public' => false,
|
||||
'exclude_from_search' => false,
|
||||
'show_in_admin_all_list' => true,
|
||||
'show_in_admin_status_list' => true,
|
||||
/* translators: %s: number of orders */
|
||||
'label_count' => _n_noop( 'Draft <span class="count">(%s)</span>', 'Draft <span class="count">(%s)</span>', 'woocommerce' ),
|
||||
),
|
||||
'wc-pending' => array(
|
||||
'label' => _x( 'Pending payment', 'Order status', 'woocommerce' ),
|
||||
'public' => false,
|
||||
|
|
Loading…
Reference in New Issue