Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>WooCommerce IntelliSense - Snippets & AutocompleteNew to Visual Studio Code? Get it now.
WooCommerce IntelliSense - Snippets & Autocomplete

WooCommerce IntelliSense - Snippets & Autocomplete

Renzo

| (0) | Free
200+ WooCommerce hooks, 16 code snippets, and function autocomplete — updated for WooCommerce 10.x with HPOS and Block Checkout.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

WooCommerce IntelliSense - Snippets & Autocomplete

200+ WooCommerce hooks, 16 code snippets, and function autocomplete — updated for WooCommerce 10.x with HPOS and Block Checkout.

Updated for the Latest WooCommerce

WooCommerce has evolved significantly in recent versions. HPOS replaced the legacy post-based order storage, Block Checkout became the default checkout experience, and hundreds of new hooks were introduced across the 8.x, 9.x, and 10.x release cycles.

This extension is built from the WooCommerce 10.6.1 source code, giving you accurate hook names, parameters, and version data that reflect how WooCommerce works today.

WooCommerce Hook Autocomplete

Type inside add_action(', add_filter(', remove_action(', remove_filter(', do_action(', or apply_filters(' and an autocomplete dropdown appears with all matching WooCommerce hooks.

Each suggestion shows the hook name, its category (Cart, Checkout, Order, Product, etc.), and whether it is an action or filter. Actions only appear inside add_action(), filters only inside add_filter() — so you never accidentally mix them up.

// Start typing inside the quotes and autocomplete appears:
add_action( 'woocommerce_checkout_  // ← suggestions appear here

// Works with all hook functions:
add_filter( 'woocommerce_product_   // ← only filter hooks shown
remove_action( 'woocommerce_        // ← only action hooks shown
do_action( 'woocommerce_            // ← action hooks
apply_filters( 'woocommerce_        // ← filter hooks

Complete List of WooCommerce Action & Filter Hooks

All hook data is extracted from WooCommerce 10.6.1 and organized into 11 categories:

Category Example Hooks
Cart woocommerce_add_to_cart, woocommerce_cart_updated, woocommerce_applied_coupon
Checkout woocommerce_checkout_process, woocommerce_checkout_fields, woocommerce_checkout_order_processed
Order woocommerce_new_order, woocommerce_order_status_changed, woocommerce_payment_complete
Product woocommerce_single_product_summary, woocommerce_product_get_price, woocommerce_before_add_to_cart_form
Payment woocommerce_available_payment_gateways, woocommerce_payment_gateways
Shipping woocommerce_package_rates, woocommerce_shipping_methods, woocommerce_calculated_shipping
Email woocommerce_email_classes, woocommerce_email_headers, woocommerce_email_order_details
Admin woocommerce_product_data_tabs, woocommerce_process_product_meta, woocommerce_admin_order_data_after_order_details
REST API woocommerce_rest_prepare_product_object, woocommerce_rest_check_permissions
Block Checkout woocommerce_blocks_enqueue_checkout_block_scripts_after, woocommerce_blocks_checkout_enqueue_data
Template woocommerce_before_main_content, woocommerce_locate_template, woocommerce_after_shop_loop_item

Totals: 100+ action hooks, 100+ filter hooks — each with parameters, types, and version info.

WooCommerce Hover Documentation

Hover over any woocommerce_* or wc_* hook name to see rich documentation:

  • Description — what the hook does in plain English
  • Parameters — exact names and types passed to your callback
  • Since — the WooCommerce version that introduced it
  • Deprecation warnings — if the hook is deprecated, shows the version and replacement
  • Code example — ready-to-copy usage
// Hover over the hook name to see full documentation:
add_action( 'woocommerce_order_status_changed', 'my_callback', 10, 4 );
//           ↑ hover here — shows $order_id, $old_status, $new_status, $order

Hovering over wc_* function calls (wc_get_product, wc_price, wc_get_orders) shows the function signature, return type, and parameter descriptions.

WooCommerce Function Autocomplete

Type wc_ anywhere in a PHP file to see all available WooCommerce functions with return types and parameter hints. Selecting a function inserts a snippet with tab stops for each parameter.

// Type wc_ and select from the list:
$product = wc_get_product( $product_id );
$price   = wc_price( 29.99 );
$orders  = wc_get_orders( array( 'limit' => 10 ) );

50+ functions covered including wc_get_product(), wc_get_orders(), wc_price(), wc_add_notice(), wc_get_template(), and more.

WooCommerce Code Snippets

16 ready-to-use code patterns. Type the prefix and press Tab to expand:

Prefix Description
wc-action Action hook registration
wc-filter Filter hook registration
wc-product-query Product query with wc_get_products()
wc-order-query HPOS-compatible order query
wc-rest-endpoint Custom REST API endpoint with permission callback
wc-payment-gateway Payment gateway class skeleton
wc-shipping-method Shipping method class skeleton
wc-email Custom email notification class
wc-settings-page Settings page extending WC_Settings_Page
wc-settings-register Register a settings page with WooCommerce
wc-checkout-field Block Checkout additional field
wc-product-tab Single product custom tab
wc-ajax WC AJAX handler with nonce verification
wc-get-product Get product with null check
wc-get-order Get order with null check
wc-admin-notice Admin dashboard notice

Every snippet follows WordPress Coding Standards and uses modern WooCommerce APIs.

Support for WooCommerce Blocks & High-Performance Order Storage (HPOS)

WooCommerce 8.2+ uses HPOS as the default order storage engine, and WooCommerce 8.3+ uses the Block Checkout as the default checkout experience. This extension is built for both:

  • HPOS-compatible queries — the wc-order-query snippet uses wc_get_orders() instead of get_posts(), ensuring your code works with both legacy and HPOS datastores
  • Block Checkout hooks — includes block-specific hooks like woocommerce_blocks_enqueue_checkout_block_scripts_after and the wc-checkout-field snippet uses woocommerce_register_additional_checkout_field()
  • Modern settings pattern — the wc-settings-page snippet extends WC_Settings_Page with get_settings_for_default_section() instead of deprecated tab hooks

Works Alongside Your Existing Extensions

Designed to complement — not conflict with — other PHP extensions:

  • Intelephense — no overlap. Intelephense handles PHP symbol completion, this extension handles WooCommerce hook string completion. They operate in different contexts.
  • WordPress Hooks IntelliSense — complementary. That extension covers WordPress core hooks (init, wp_enqueue_scripts), this extension covers WooCommerce-specific hooks (woocommerce_*, wc_*).
  • PHP IntelliSense — no conflicts. Different completion triggers and contexts.

Requirements

  • VS Code 1.80 or later
  • Activates automatically on PHP files
  • No configuration needed

Learn More

  • Full documentation and examples
  • WooCommerce Developer Documentation
  • Report an issue

License

GPL-3.0

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft