Use WooCommerce's customer and session APIs correctly — WC ships its own session handler (WC_Session_Handler, single wp_woocommerce_session…
“电商与销售”领域的一个 Skill。已为 Claude Code, Codex, OpenCode 及另外 32 个智能体 准备好命令。
完整描述
Use WooCommerce's customer and session APIs correctly — WC ships its own session handler (WC_Session_Handler, single wp_woocommerce_sessions table for both guests and logged-in users) and its own customer object (WC_Customer via WC()->customer). Avoid $_SESSION, direct setcookie, and user_meta for guest/session state. Use WC()->session->set/get for ephemeral visitor data, WC()->customer->get_billing_* for active customer context including guests, and new WC_Customer($user_id) for one-off loads. WC()->session auto-inits only on frontend/admin-ajax; REST, cron, and WP-CLI must call wc_load_cart() explicitly, while Store API cart/checkout routes can use Cart-Token sessions. Use when storing per-visitor state, reading billing data, or debugging session loss across cache/REST/cron. Triggers on WC_Session, WC_Session_Handler, WC_Customer, WC()->session, WC()->customer, wp_woocommerce_sessions.
Skill 是加载到智能体(如 Claude Code 或 Codex)里的一组指令。就像在手机上安装应用:装一次,智能体就知道怎么做这件事。
它有什么用?
用于“电商与销售”相关工作。发布者的介绍:Use WooCommerce's customer and session APIs correctly — WC ships its own session handler (WC_Session_Handler, single wp_woocommerce_sessions table for both gue…
示例请求
“更新商店里的商品描述。”
智能体
已为 Claude Code, Codex, OpenCode 及另外 32 个智能体 准备好命令。
值得信任吗?
27 个 GitHub 星标 · MIT。安装前请先查看来源。
使用情况
最近 30 天,网站和智能体上。
0个书架收藏
0次浏览
0次命令复制
0次网站下载
0次通过应用安装
0次由智能体自行安装
0位活跃用户
实测评分需要 ANG 应用中至少 20 位用户和 50 个任务;目前有 0 位用户、0 个任务。在此之前,强度分根据条目数据估算。