重命名 WooCommerce 订阅状态
Renaming WooCommerce Subscription status
我看到了更改 WooCommerce 订单状态引用的代码,我该如何调整它以更改 WooCommerce 订阅状态?我想将“活动”更改为其他内容:
function wc_renaming_order_status( $order_statuses ) {
foreach ( $order_statuses as $key => $status ) {
if ( 'wc-completed' === $key )
$order_statuses['wc-completed'] = _x( 'Order Received', 'Order status', 'woocommerce' );
}
return $order_statuses;
}
add_filter('wcs_subscription_statuses', 'custom_wc_order_statuses', 10, 1);
function custom_wc_order_statuses($subscription_statuses) {
$subscription_statuses['wc-active'] = _x('Order Received', 'Subscription status', 'woocommerce-subscriptions' )
return $subscription_statuses;
}
我看到了更改 WooCommerce 订单状态引用的代码,我该如何调整它以更改 WooCommerce 订阅状态?我想将“活动”更改为其他内容:
function wc_renaming_order_status( $order_statuses ) {
foreach ( $order_statuses as $key => $status ) {
if ( 'wc-completed' === $key )
$order_statuses['wc-completed'] = _x( 'Order Received', 'Order status', 'woocommerce' );
}
return $order_statuses;
}
add_filter('wcs_subscription_statuses', 'custom_wc_order_statuses', 10, 1);
function custom_wc_order_statuses($subscription_statuses) {
$subscription_statuses['wc-active'] = _x('Order Received', 'Subscription status', 'woocommerce-subscriptions' )
return $subscription_statuses;
}