wc-cart-checkout-classic

Customize WooCommerce classic cart and shortcode checkout with custom cart item data and HPOS-safe order saving.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/vikingokft/wp-agent-skills --skill wc-cart-checkout-classic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wc-cart-checkout-classic
Source: https://github.com/vikingokft/wp-agent-skills/tree/main/woocommerce/wc-cart-checkout-classic
Command: npx skills add https://github.com/vikingokft/wp-agent-skills --skill wc-cart-checkout-classic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you customize WooCommerce’s classic cart and classic (shortcode) checkout so custom product options and cart item data are correctly merged, displayed, validated, priced, and copied into the right order line item metadata.

Core Features & Use Cases

  • Accurate cart item identity & merging: Uses cart item data stored via add-to-cart hooks so items merge only when intended.
  • Proper data flow from cart to order lines: Displays custom cart fields and persists them at the correct level using order line item meta (not order-level meta).
  • HPOS-safe checkout updates: Updates order line item meta and order APIs safely, avoiding direct post meta writes that break HPOS.
  • Classic checkout enhancements: Adds/modifies classic checkout fields, validates posted values, and ensures correct server-side handling.
  • Safe dynamic pricing & fees: Mutates prices during totals calculation without compounding, and applies fees in the correct fee hook.

Quick Start

Use the wc-cart-checkout-classic skill to ensure your custom cart option (like engraving or gift-wrap) is shown in the cart/checkout, validated, applied as a fee or price adjustment, and saved to the corresponding order line item meta.

Frequently Asked Questions about wc-cart-checkout-classic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save custom WooCommerce cart item data to order line item meta?

WooCommerce custom cart item data flows to order lines by hooking into checkout processing to copy cart values directly into WC_Order_Item_Product metadata, ensuring bespoke add-to-cart options persist at the line item level rather than as general order meta.

How do I add a custom fee to WooCommerce classic cart totals without price compounding?

You add custom fees to WooCommerce classic cart totals by applying them within the correct WooCommerce fee hook during totals recalculation, which applies the surcharge safely without causing price mutation compounding across cart items.

Does WooCommerce HPOS require special handling for updating order line item meta in classic checkout?

WooCommerce HPOS requires special handling for order line item meta updates because direct post meta writes break the high-performance order storage architecture, meaning you must use HPOS-safe order APIs to update line item data during classic checkout processing.

How do I customize WooCommerce classic shortcode checkout fields and validate posted values?

You customize WooCommerce classic shortcode checkout fields by extending the checkout field array, adding server-side validation for the posted values, and ensuring the custom data maps correctly to the order without conflicting with the Checkout Block StoreAPI boundary.

Why are my WooCommerce cart items with custom add-to-cart options not merging correctly?

WooCommerce cart items with custom add-to-cart options fail to merge correctly when cart item data hooks are not implemented properly, causing items to be treated as separate line items instead of merging when the custom identity parameters match.

What is the best way to mutate WooCommerce cart item prices dynamically during totals calculation?

The best way to mutate WooCommerce cart item prices dynamically is during the totals recalculation phase, applying absolute price mutations through the required cart hooks so the custom pricing updates accurately without multiplying or compounding the adjusted amounts.