惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
SecWiki News
SecWiki News
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
F
Fortinet All Blogs
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
aimingoo的专栏
aimingoo的专栏
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
O
OpenAI News
T
Troy Hunt's Blog
TaoSecurity Blog
TaoSecurity Blog
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LINUX DO - 最新话题
N
News | PayPal Newsroom
PCI Perspectives
PCI Perspectives
Engineering at Meta
Engineering at Meta
美团技术团队
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
V
Vulnerabilities – Threatpost
B
Blog RSS Feed
NISL@THU
NISL@THU
Security Latest
Security Latest
The Register - Security
The Register - Security
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
N
News and Events Feed by Topic
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Schneier on Security
罗磊的独立博客
Know Your Adversary
Know Your Adversary
Hacker News: Ask HN
Hacker News: Ask HN
S
Security Affairs
月光博客
月光博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

WooCommerce教程 – 奶爸建站笔记

怎么删除WooCommerce产品价格显示 – 奶爸建站笔记 怎么修改WooCommerce的产品排序 – 奶爸建站笔记 允许在WooCommerce的分类描述里面插入html代码和图片 – 奶爸建站笔记 免插件导出WooCommerce订单教程 – 奶爸建站笔记 自定义WooCommerce库存提示插件,修改Out of stock缺货提示 – 奶爸建站笔记 2025年最新PayPal注册教程,对接WooCommerce独立站收款 – 奶爸建站笔记 WooCommerce短代码大全,从任意位置调用商品信息 – 奶爸建站笔记
给WooCommerce订单添加一个正在运输中的状态 – 奶爸建站笔记
Lee · 2022-12-04 · via WooCommerce教程 – 奶爸建站笔记

我们知道,可以通过WooCommerce搭建自己的跨境电商独立站,而默认的WooCommerce订单状态只有Completed已完成、Processing处理中、On hold保留和Cancelled已取消这几种状态,我们做跨境订单的时候物流时间会比较久,如果按照正常的显示Processing处理中对用户来说可能会造成困扰,而如果我们新增加一个运输中的状态,就会更好友好。

想要给WooCommerce的订单添加额外的自定义状态可以通过插件或者代码的方式来处理。

使用插件添加自定义订单状态

Custom Order Status for WooCommerce是一款免费给WooCommerce添加订单状态的插件,可以从WordPress后台免费安装。

插件地址

使用这款插件,还可以为自定义状态添加图标和颜色。

Custom Order Status for WooCommerce

使用代码添加自定义订单状态

使用代码添加的话可以少安装一个插件,不过小白乱改代码可能会导致网站出现错误,所以使用此方法请谨慎。

function naiba_wc_register_post_statuses() {
	register_post_status( 'wc-shipping-progress', array(
	'label' => _x( 'Shipping In Progress', 'WooCommerce Order status', 'text_domain' ),
	'public' => true,
	'exclude_from_search' => false,
	'show_in_admin_all_list' => true,
	'show_in_admin_status_list' => true,
	'label_count' => _n_noop( 'Approved (%s)', 'Approved (%s)', 'text_domain' )
	) );
	}
	add_filter( 'init', 'naiba_wc_register_post_statuses' );
	function naiba_wc_add_order_statuses( $order_statuses ) {
		$order_statuses['wc-shipping-progress'] = _x( 'Shipping In Progress', 'WooCommerce Order status', 'text_domain' );
		return $order_statuses;
		}
add_filter( 'wc_order_statuses', 'naiba_wc_add_order_statuses' );

添加上面代码到你主题函数文件里面,保存之后就可以在订单列表状态中看到Shipping In Progress的选项。

🚀 看教程还是觉得迷茫?不如让我手把手带你

「WordPress建站陪跑」——从选域名、买主机,到装主题、上线发文,每一步都有我全程陪跑,少走弯路,直达目标。

👉 了解建站陪跑服务