I would like to modify a function contained in woocommerce. This is my edited function (woocommerce/includes/wc-order-functions.php
):
function wc_get_order_statuses() {
$order_statuses = array(
'wc-pending' => _x( 'Pending Payment', 'Order status', 'woocommerce' ),
/*'wc-processing' => _x( 'Processing', 'Order status', 'woocommerce' ),*/
'wc-on-hold' => _x( 'On Hold', 'Order status', 'woocommerce' ),
'wc-completed' => _x( 'Completed', 'Order status', 'woocommerce' ),
'wc-cancelled' => _x( 'Cancelled', 'Order status', 'woocommerce' ),
'wc-refunded' => _x( 'Refunded', 'Order status', 'woocommerce' ),
'wc-failed' => _x( 'Failed', 'Order status', 'woocommerce' ),
);
return apply_filters( 'wc_order_statuses', $order_statuses );
}
I tried to load a new function within the function.php
file in the child theme, but does not seem to work.
what I want to achieve is to eliminate the order item "Processing" from the status menu. I also tried with css but those do not support
select option[value="wc-processing"] {display: none !important;}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…