WooCommerce Code Reference

Search results

Documentation

Namespaces

Automattic

Packages

WooCommerceClasses
WooCommerceAbstracts
WooCommerce
WooCommerceAdmin
WooCommerceAdminCustomize
WooCommerceAdminMetaBoxes
WooCommerceadmin
WooCommerceAdminReports
WooCommerceAdminSystemStatus
Default
WooCommerceHelper
WooCommerceAdminImporters
WooCommerceTemplates
WooCommerceAdminReporting
WooCommerceAdminShipping
WooCommerceAdminSettings
WooCommerceAdminWebhooksViews
Settings
WooCommerceAdminExport
WooCommerceAdminLogs
WooCommerceViews
admin
WooCommerceAdminFunctions
WooCommerceAPI
WooCommerceClassesProducts
WooCommerceClassesEmails
WooCommerceClassesEmbed
WooCommerceClassesIntegrations
WooCommerceClassesPayment
WooCommerceClassesData
WooCommerceClassesShipping
WooCommerceWebhooks
data
WooCommerceExport
WooCommercePayPal
WooCommerceImport
WooCommerceIntegrations
WooCommerceInterfaces
WooCommerceInterface
WooCommerceClassesLog
WooCommercePaymentTokens
WooCommerceShortcodesCart
WooCommerceShortcodesCheckout
WooCommerceShortcodesMy
WooCommerceShortcodesOrder
WooCommerceShortcodes
WooCommerceTraits
WooCommerceClassesWalkers
WooCommerceFunctions
WooCommerceWCCOM
WooCommerceWidgets
WoocommerceAdmin
WC
WooCommerceAdminTemplatesEmailsHTML
WooCommerceAdminAPI
WooCommerceAdminClasses
WooCommerceAdminInterface
Automattic
AutomatticWooCommerceWCAdmin
WooCommerceBlocks
AutomatticWooCommerceBlocks
AutomatticWooCommerceRestApi
AutomatticWooCommerceUtilities
AutomatticWooCommerce
WooCommerceTemplatesAuth
WooCommerceTemplatesEmails
WooCommerceTemplatesEmailsHTML
WooCommerceTemplatesEmailsPlain

Interfaces, Classes and Traits

WC_Abstract_Order_Data_Store_Interface
WC Order Data Store Interface
WC_Coupon_Data_Store_Interface
WC Coupon Data Store Interface
WC_Customer_Data_Store_Interface
WC Customer Data Store Interface
WC_Customer_Download_Data_Store_Interface
WC Customer Download Data Store Interface.
WC_Customer_Download_Log_Data_Store_Interface
WC Customer Download Log Data Store Interface.
WC_Importer_Interface
WC_Importer_Interface class.
WC_Log_Handler_Interface
WC Log Handler Interface
WC_Logger_Interface
WC Logger Interface
WC_Object_Data_Store_Interface
WC Data Store Interface
WC_Order_Data_Store_Interface
WC Order Data Store Interface
WC_Order_Item_Data_Store_Interface
WC Order Item Data Store Interface
WC_Order_Item_Product_Data_Store_Interface
WC Order Item Data Store Interface
WC_Order_Item_Type_Data_Store_Interface
WC Order Item Data Store Interface
WC_Order_Refund_Data_Store_Interface
WC Order Refund Data Store Interface
WC_Payment_Token_Data_Store_Interface
WC Payment Token Data Store Interface
WC_Product_Data_Store_Interface
WC Product Data Store Interface
WC_Product_Variable_Data_Store_Interface
WC Product Variable Data Store Interface
WC_Queue_Interface
WC Queue Interface
WC_Shipping_Zone_Data_Store_Interface
WC Shipping Zone Data Store Interface.
WC_Webhook_Data_Store_Interface
WooCommerce Webhook data store interface.
WC_Data
Abstract WC Data Class
WC_Deprecated_Hooks
WC_Deprecated_Hooks class maps old actions and filters to new ones. This is the base class for handling those deprecated hooks.
WC_Integration
Abstract Integration Class
WC_Log_Handler
Abstract WC Log Handler Class
WC_Object_Query
Abstract WC Object Query Class
WC_Abstract_Order
WC_Abstract_Order class.
WC_Payment_Gateway
WooCommerce Payment Gateway class.
WC_Payment_Token
WooCommerce Payment Token.
WC_Abstract_Privacy
Abstract class that is intended to be extended by specific privacy class. It handles the display of the privacy message of the privacy id to the admin, privacy data to be exported and privacy data to be deleted.
WC_Product
Abstract Product Class
WC_Session
WC_Session
WC_Settings_API
WC_Settings_API class.
WC_Shipping_Method
WooCommerce Shipping Method Class.
WC_Widget
WC_Widget
WC_Background_Process
WC_Background_Process class.
WC_Admin_Addons
WC_Admin_Addons Class.
WC_Admin_API_Keys_Table_List
API Keys table list class.
WC_Admin_API_Keys
WC_Admin_API_Keys.
WC_Admin_Assets
WC_Admin_Assets Class.
WC_Admin_Attributes
WC_Admin_Attributes Class.
WC_Admin_Customize
WC_Admin_Customize Class.
WC_Admin_Dashboard
WC_Admin_Dashboard Class.
WC_Admin_Duplicate_Product
WC_Admin_Duplicate_Product Class.
WC_Admin_Exporters
WC_Admin_Exporters Class.
WC_Admin_Help
WC_Admin_Help Class.
WC_Admin_Importers
WC_Admin_Importers Class.
WC_Admin_Log_Table_List
WC_Admin_Menus
WC_Admin_Menus Class.
WC_Admin_Meta_Boxes
WC_Admin_Meta_Boxes.
WC_Admin_Notices
WC_Admin_Notices Class.
WC_Admin_Permalink_Settings
WC_Admin_Permalink_Settings Class.
WC_Admin_Pointers
WC_Admin_Pointers Class.
WC_Admin_Post_Types
WC_Admin_Post_Types Class.
WC_Admin_Profile
WC_Admin_Profile Class.
WC_Admin_Reports
WC_Admin_Reports Class.
WC_Admin_Settings
WC_Admin_Settings Class.
WC_Admin_Setup_Wizard
WC_Admin_Setup_Wizard class.
WC_Admin_Status
WC_Admin_Status Class.
WC_Admin_Taxonomies
WC_Admin_Taxonomies class.
WC_Admin_Webhooks_Table_List
Webooks table list class.
WC_Admin_Webhooks
WC_Admin_Webhooks.
WC_Admin
WC_Admin class.
WC_Helper_API
WC_Helper_API Class
WC_Helper_Compat
WC_Helper_Compat Class
WC_Helper_Options
WC_Helper_Options Class
WC_Helper_Plugin_Info
WC_Helper_Plugin_Info Class
WC_Helper_Updater
WC_Helper_Updater Class
WC_Helper
WC_Helper Class
WC_Product_CSV_Importer_Controller
Product importer controller - handles file upload and forms in admin.
WC_Tax_Rate_Importer
Tax Rates importer - import tax rates and local tax rates into WooCommerce.
WC_Admin_List_Table
WC_Admin_List_Table Class.
WC_Admin_List_Table_Coupons
WC_Admin_List_Table_Coupons Class.
WC_Admin_List_Table_Orders
WC_Admin_List_Table_Orders Class.
WC_Admin_List_Table_Products
WC_Admin_List_Table_Products Class.
WC_Marketplace_Suggestions
Marketplace suggestions core behaviour.
WC_Marketplace_Updater
Marketplace Suggestions Updater
WC_Meta_Box_Coupon_Data
WC_Meta_Box_Coupon_Data Class.
WC_Meta_Box_Order_Actions
WC_Meta_Box_Order_Actions Class.
WC_Meta_Box_Order_Data
WC_Meta_Box_Order_Data Class.
WC_Meta_Box_Order_Downloads
WC_Meta_Box_Order_Downloads Class.
WC_Meta_Box_Order_Items
WC_Meta_Box_Order_Items Class.
WC_Meta_Box_Order_Notes
WC_Meta_Box_Order_Notes Class.
WC_Meta_Box_Product_Data
WC_Meta_Box_Product_Data Class.
WC_Meta_Box_Product_Images
WC_Meta_Box_Product_Images Class.
WC_Meta_Box_Product_Reviews
WC_Meta_Box_Product_Reviews
WC_Meta_Box_Product_Short_Description
WC_Meta_Box_Product_Short_Description Class.
WC_Notes_Run_Db_Update
WC_Notes_Run_Db_Update.
WC_Plugin_Updates
WC_Admin_Plugin_Updates Class.
WC_Plugins_Screen_Updates
Class WC_Plugins_Screen_Updates
WC_Updates_Screen_Updates
Class WC_Updates_Screen_Updates
WC_Admin_Report
Admin Report.
WC_Report_Coupon_Usage
WC_Report_Coupon_Usage
WC_Report_Customer_List
WC_Report_Customer_List.
WC_Report_Customers
WC_Report_Customers
WC_Report_Downloads
WC_Report_Downloads.
WC_Report_Low_In_Stock
Low stock report class.
WC_Report_Most_Stocked
WC_Report_Most_Stocked.
WC_Report_Out_Of_Stock
WC_Report_Out_Of_Stock class.
WC_Report_Sales_By_Category
WC_Report_Sales_By_Category
WC_Report_Sales_By_Date
WC_Report_Sales_By_Date
WC_Report_Sales_By_Product
WC_Report_Sales_By_Product
WC_Report_Stock
WC_Report_Stock.
WC_Report_Taxes_By_Code
WC_Report_Taxes_By_Code
WC_Report_Taxes_By_Date
WC_Report_Taxes_By_Date
WC_Settings_Accounts
WC_Settings_Accounts.
WC_Settings_Advanced
WC_Settings_Advanced.
WC_Settings_Rest_API
WC_Settings_Rest_API class.
WC_Settings_Emails
WC_Settings_Emails.
WC_Settings_General
WC_Admin_Settings_General.
WC_Settings_Integrations
WC_Settings_Integrations.
WC_Settings_Page
WC_Settings_Page.
WC_Settings_Payment_Gateways
WC_Settings_Payment_Gateways.
WC_Settings_Products
WC_Settings_Products.
WC_Settings_Shipping
WC_Settings_Shipping.
WC_Settings_Tax
WC_Settings_Tax.
WC_AJAX
WC_Ajax class.
WC_API
WC_API class.
WC_Auth
Auth class.
WC_Autoloader
Autoloader class.
WC_Background_Emailer
WC_Background_Emailer Class.
WC_Background_Updater
WC_Background_Updater Class.
WC_Breadcrumb
Breadcrumb class.
WC_Cache_Helper
WC_Cache_Helper.
WC_Cart_Fees
WC_Cart_Fees class.
WC_Cart_Session
WC_Cart_Session class.
WC_Cart_Totals
WC_Cart_Totals class.
WC_Cart
WC_Cart class.
WC_Checkout
Checkout class.
WC_CLI
CLI class.
WC_Comments
Comments class.
WC_Countries
The WooCommerce countries class stores country/state data.
WC_Coupon
Coupon class.
WC_Customer_Download_Log
Customer download log class.
WC_Customer_Download
Customer download class.
WC_Customer
Customer class.
WC_Data_Exception
Data exception class.
WC_Data_Store
Data store class.
WC_DateTime
Datetime class.
WC_Deprecated_Action_Hooks
Handles deprecation notices and triggering of legacy action hooks.
WC_Deprecated_Filter_Hooks
Handles deprecation notices and triggering of legacy filter hooks
WC_Discounts
Discounts class.
WC_Download_Handler
Download handler class.
WC_Emails
Emails class.
WC_Embed
Embed Class which handles any WooCommerce Products that are embedded on this site or another site.
WC_Form_Handler
WC_Form_Handler class.
WC_Frontend_Scripts
Frontend scripts class.
WC_Geo_IP
WC_Geo_IP Class.
WC_Geo_IP_Record
Geo IP Record class.
WC_Geolite_Integration
Geolite integration class.
WC_Geolocation
WC_Geolocation Class.
WC_HTTPS
WC_HTTPS class.
WC_Install
WC_Install Class.
WC_Integrations
Integrations class.
WC_Log_Levels
Log levels class.
WC_Logger
WC_Logger class.
WC_Meta_Data
Meta data class.
WC_Order_Factory
Order factory class
WC_Order_Item_Coupon
Order item coupon class.
WC_Order_Item_Fee
Order item fee.
WC_Order_Item_Meta
Order item meta class.
WC_Order_Item_Product
Order item product class.
WC_Order_Item_Shipping
Order item shipping class.
WC_Order_Item_Tax
Order item tax.
WC_Order_Item
Order item class.
WC_Order_Query
Order query class.
WC_Order_Refund
Order refund class.
WC_Order
Order Class.
WC_Payment_Gateways
Payment gateways class.
WC_Payment_Tokens
Payment tokens class.
WC_Post_Data
Post data class.
WC_Post_Types
Post types Class.
WC_Privacy_Background_Process
WC_Privacy_Background_Process class.
WC_Privacy_Erasers
WC_Privacy_Erasers Class.
WC_Privacy_Exporters
WC_Privacy_Exporters Class.
WC_Privacy
WC_Privacy Class.
WC_Product_Attribute
Product attribute class.
WC_Product_Download
Product download class.
WC_Product_External
Product external class.
WC_Product_Factory
Product factory class.
WC_Product_Grouped
Product grouped class.
WC_Product_Query
Product query class.
WC_Product_Simple
Simple product class.
WC_Product_Variable
Variable product class.
WC_Product_Variation
Product variation class.
WC_Query
WC_Query Class.
WC_Rate_Limiter
Rate limit class.
WC_Regenerate_Images_Request
Class that extends WC_Background_Process to process image regeneration in the background.
WC_Regenerate_Images
Regenerate Images Class
WC_Register_WP_Admin_Settings
Register WP admin settings class.
WC_REST_Authentication
REST API authentication class.
WC_REST_Exception
WC_REST_Exception class.
WC_Session_Handler
Session handler class.
WC_Shipping_Rate
Shipping rate class.
WC_Shipping_Zone
WC_Shipping_Zone class.
WC_Shipping_Zones
Shipping zones class.
WC_Shipping
Shipping class.
WC_Shortcodes
WooCommerce Shortcodes class.
WC_Structured_Data
Structured data class.
WC_Tax
Performs tax calculations and loads tax rates
WC_Template_Loader
Template loader class.
WC_Tracker
WooCommerce Tracker Class
WC_Validation
Validation class.
WC_Webhook
Webhook class.
WooCommerce
Main WooCommerce Class.
WC_CLI_REST_Command
Main Command for WooCommere CLI.
WC_CLI_Runner
WC API to WC CLI Bridge.
WC_CLI_Tool_Command
Hooks up our system status tools to the CLI.
WC_CLI_Update_Command
Allows updates via CLI.
WC_Customizer_Control_Cropping
WC_Customizer_Control_Cropping class.
WC_Shop_Customizer
WC_Shop_Customizer class.
Abstract_WC_Order_Data_Store_CPT
Abstract Order Data Store: Stored in CPT.
Abstract_WC_Order_Item_Type_Data_Store
WC Order Item Data Store
WC_Coupon_Data_Store_CPT
WC Coupon Data Store: Custom Post Type.
WC_Customer_Data_Store_Session
WC Customer Data Store which stores the data in session.
WC_Customer_Data_Store
WC Customer Data Store.
WC_Customer_Download_Data_Store
WC Customer Download Data Store.
WC_Customer_Download_Log_Data_Store
WC_Customer_Download_Log_Data_Store class.
WC_Data_Store_WP
WC_Data_Store_WP class.
WC_Order_Data_Store_CPT
WC Order Data Store: Stored in CPT.
WC_Order_Item_Coupon_Data_Store
WC Order Item Coupon Data Store
WC_Order_Item_Data_Store
WC Order Item Data Store: Misc Order Item Data functions.
WC_Order_Item_Fee_Data_Store
WC Order Item Fee Data Store
WC_Order_Item_Product_Data_Store
WC Order Item Product Data Store
WC_Order_Item_Shipping_Data_Store
WC_Order_Item_Shipping_Data_Store class.
WC_Order_Item_Tax_Data_Store
WC Order Item Tax Data Store
WC_Order_Refund_Data_Store_CPT
WC Order Refund Data Store: Stored in CPT.
WC_Payment_Token_Data_Store
WC Payment Token Data Store: Custom Table.
WC_Product_Data_Store_CPT
WC Product Data Store: Stored in CPT.
WC_Product_Grouped_Data_Store_CPT
WC Grouped Product Data Store: Stored in CPT.
WC_Product_Variable_Data_Store_CPT
WC Variable Product Data Store: Stored in CPT.
WC_Product_Variation_Data_Store_CPT
WC Variation Product Data Store: Stored in CPT.
WC_Shipping_Zone_Data_Store
WC Shipping Zone Data Store.
WC_Webhook_Data_Store
Webhook data store class.
WC_Email_Cancelled_Order
Cancelled Order Email.
WC_Email_Customer_Completed_Order
Customer Completed Order Email.
WC_Email_Customer_Invoice
Customer Invoice.
WC_Email_Customer_New_Account
Customer New Account.
WC_Email_Customer_Note
Customer Note Order Email.
WC_Email_Customer_On_Hold_Order
Customer On-hold Order Email.
WC_Email_Customer_Processing_Order
Customer Processing Order Email.
WC_Email_Customer_Refunded_Order
Customer Refunded Order Email.
WC_Email_Customer_Reset_Password
Customer Reset Password.
WC_Email_Failed_Order
Failed Order Email.
WC_Email_New_Order
New Order Email.
WC_Email
Email Class
WC_CSV_Batch_Exporter
WC_CSV_Exporter Class.
WC_CSV_Exporter
WC_CSV_Exporter Class.
WC_Product_CSV_Exporter
WC_Product_CSV_Exporter Class.
WC_Gateway_BACS
Bank Transfer Payment Gateway.
WC_Gateway_Cheque
Cheque Payment Gateway.
WC_Payment_Gateway_CC
Credit Card Payment Gateway
WC_Payment_Gateway_ECheck
Class for eCheck Payment Gateway
WC_Gateway_COD
Cash on Delivery Gateway.
WC_Gateway_Paypal
WC_Gateway_Paypal Class.
WC_Gateway_Paypal_API_Handler
Handles Refunds and other API requests such as capture.
WC_Gateway_Paypal_Refund
Here for backwards compatibility.
WC_Gateway_Paypal_IPN_Handler
WC_Gateway_Paypal_IPN_Handler class.
WC_Gateway_Paypal_PDT_Handler
Handle PDT Responses from PayPal.
WC_Gateway_Paypal_Request
Generates requests to send to PayPal.
WC_Gateway_Paypal_Response
Handles Responses.
WC_Product_Importer
WC_Product_Importer Class.
WC_Product_CSV_Importer
WC_Product_CSV_Importer Class.
WC_Integration_MaxMind_Database_Service
The service class responsible for interacting with MaxMind databases.
WC_Integration_MaxMind_Geolocation
WC Integration MaxMind Geolocation
WC_Abstract_Legacy_Order
Legacy Abstract Order
WC_Legacy_Payment_Token
Legacy Payment Tokens.
WC_Abstract_Legacy_Product
Legacy Abstract Product
WC_Legacy_API
Legacy API.
WC_Legacy_Cart
Legacy cart class.
WC_Legacy_Coupon
Legacy Coupon.
WC_Legacy_Customer
Legacy Customer.
WC_Legacy_Shipping_Zone
Legacy Shipping Zone.
WC_Legacy_Webhook
Legacy Webhook class.
WC_Log_Handler_DB
Handles log entries by writing to database.
WC_Log_Handler_Email
Handles log entries by sending an email.
WC_Log_Handler_File
Handles log entries by writing to a file.
WC_Payment_Token_CC
WooCommerce Credit Card Payment Token.
WC_Payment_Token_ECheck
WooCommerce eCheck Payment Token.
WC_Action_Queue
WC Action Queue
WC_Queue
WC Queue
WC_Shipping_Flat_Rate
WC_Shipping_Flat_Rate class.
WC_Shipping_Free_Shipping
Free Shipping Method.
WC_Shipping_Legacy_Flat_Rate
Flat Rate Shipping Method.
WC_Shipping_Legacy_Free_Shipping
Free Shipping Method.
WC_Shipping_Legacy_International_Delivery
International Delivery - Based on the Flat Rate Shipping Method.
WC_Shipping_Legacy_Local_Delivery
Local Delivery Shipping Method.
WC_Shipping_Legacy_Local_Pickup
Local Pickup Shipping Method.
WC_Shipping_Local_Pickup
Local Pickup Shipping Method.
WC_Shortcode_Cart
Shortcode cart class.
WC_Shortcode_Checkout
Shortcode checkout class.
WC_Shortcode_My_Account
Shortcode my account class.
WC_Shortcode_Order_Tracking
Shortcode order tracking class.
WC_Shortcode_Products
Products shortcode class.
WC_Twenty_Eleven
WC_Twenty_Eleven class.
WC_Twenty_Fifteen
WC_Twenty_Fifteen class.
WC_Twenty_Fourteen
WC_Twenty_Fourteen class.
WC_Twenty_Nineteen
WC_Twenty_Nineteen class.
WC_Twenty_Seventeen
WC_Twenty_Seventeen class.
WC_Twenty_Sixteen
WC_Twenty_Sixteen class.
WC_Twenty_Ten
WC_Twenty_Ten class.
WC_Twenty_Thirteen
WC_Twenty_Thirteen class.
WC_Twenty_Twelve
WC_Twenty_Twelve class.
WC_Twenty_Twenty
WC_Twenty_Twenty class.
WC_Site_Tracking
This class adds actions to track usage of WooCommerce.
WC_Tracks_Client
WC_Tracks_Client class.
WC_Tracks_Event
WC_Tracks_Event class.
WC_Tracks_Footer_Pixel
WC_Tracks_Footer_Pixel class.
WC_Tracks
WC_Tracks class.
WC_Admin_Setup_Wizard_Tracking
This class adds actions to track usage of the WooCommerce Onboarding Wizard.
WC_Coupon_Tracking
This class adds actions to track usage of a WooCommerce Coupon.
WC_Coupons_Tracking
This class adds actions to track usage of WooCommerce Orders.
WC_Extensions_Tracking
This class adds actions to track usage of the WooCommerce Extensions page.
WC_Importer_Tracking
This class adds actions to track usage of WooCommerce Imports.
WC_Order_Tracking
This class adds actions to track usage of a WooCommerce Order.
WC_Orders_Tracking
This class adds actions to track usage of WooCommerce Orders.
WC_Products_Tracking
This class adds actions to track usage of WooCommerce Products.
WC_Settings_Tracking
This class adds actions to track usage of WooCommerce Settings.
WC_Status_Tracking
This class adds actions to track usage of WooCommerce Orders.
WC_Product_Cat_Dropdown_Walker
Product category dropdown walker class.
WC_Product_Cat_List_Walker
Product cat list walker class.
WC_WCCOM_Site_Installer_Requirements_Check
WC_WCCOM_Site_Installer_Requirements_Check Class Contains functionality to check the necessary requirements for the installer.
WC_WCCOM_Site_Installer
WC_WCCOM_Site_Installer Class
WC_WCCOM_Site
WC_WCCOM_Site Class
WC_REST_WCCOM_Site_Installer_Errors
WCCOM Site Installer Errors Class
WC_REST_WCCOM_Site_Installer_Controller
REST API WCCOM Site Installer Controller Class.
WC_Widget_Cart
Widget cart class.
WC_Widget_Layered_Nav_Filters
Widget layered nav filters.
WC_Widget_Layered_Nav
Widget layered nav class.
WC_Widget_Price_Filter
Widget price filter class.
WC_Widget_Product_Categories
Product categories widget class.
WC_Widget_Product_Search
Widget product search class.
WC_Widget_Product_Tag_Cloud
Widget product tag cloud
WC_Widget_Products
Widget products.
WC_Widget_Rating_Filter
Widget rating filter class.
WC_Widget_Recent_Reviews
Widget recent reviews class.
WC_Widget_Recently_Viewed
Widget recently viewed.
WC_Widget_Top_Rated_Products
Widget top rated products class.
WC_REST_Coupons_V1_Controller
REST API Coupons controller class.
WC_REST_Customer_Downloads_V1_Controller
REST API Customers controller class.
WC_REST_Customers_V1_Controller
REST API Customers controller class.
WC_REST_Order_Notes_V1_Controller
REST API Order Notes controller class.
WC_REST_Order_Refunds_V1_Controller
REST API Order Refunds controller class.
WC_REST_Orders_V1_Controller
REST API Orders controller class.
WC_REST_Product_Attribute_Terms_V1_Controller
REST API Product Attribute Terms controller class.
WC_REST_Product_Attributes_V1_Controller
REST API Product Attributes controller class.
WC_REST_Product_Categories_V1_Controller
REST API Product Categories controller class.
WC_REST_Product_Reviews_V1_Controller
REST API Product Reviews Controller Class.
WC_REST_Product_Shipping_Classes_V1_Controller
REST API Product Shipping Classes controller class.
WC_REST_Product_Tags_V1_Controller
REST API Product Tags controller class.
WC_REST_Products_V1_Controller
REST API Products controller class.
WC_REST_Report_Sales_V1_Controller
REST API Report Sales controller class.
WC_REST_Report_Top_Sellers_V1_Controller
REST API Report Top Sellers controller class.
WC_REST_Reports_V1_Controller
REST API Reports controller class.
WC_REST_Tax_Classes_V1_Controller
REST API Tax Classes controller class.
WC_REST_Taxes_V1_Controller
REST API Taxes controller class.
WC_REST_Webhook_Deliveries_V1_Controller
REST API Webhook Deliveries controller class.
WC_REST_Webhooks_V1_Controller
REST API Webhooks controller class.
WC_REST_Coupons_V2_Controller
REST API Coupons controller class.
WC_REST_Customer_Downloads_V2_Controller
REST API Customers controller class.
WC_REST_Customers_V2_Controller
REST API Customers controller class.
WC_REST_Network_Orders_V2_Controller
REST API Network Orders controller class.
WC_REST_Order_Notes_V2_Controller
REST API Order Notes controller class.
WC_REST_Order_Refunds_V2_Controller
REST API Order Refunds controller class.
WC_REST_Orders_V2_Controller
REST API Orders controller class.
WC_REST_Payment_Gateways_V2_Controller
Paymenga gateways controller class.
WC_REST_Product_Attribute_Terms_V2_Controller
REST API Product Attribute Terms controller class.
WC_REST_Product_Attributes_V2_Controller
REST API Product Attributes controller class.
WC_REST_Product_Categories_V2_Controller
REST API Product Categories controller class.
WC_REST_Product_Reviews_V2_Controller
REST API Product Reviews Controller Class.
WC_REST_Product_Shipping_Classes_V2_Controller
REST API Product Shipping Classes controller class.
WC_REST_Product_Tags_V2_Controller
REST API Product Tags controller class.
WC_REST_Product_Variations_V2_Controller
REST API variations controller class.
WC_REST_Products_V2_Controller
REST API Products controller class.
WC_REST_Report_Sales_V2_Controller
REST API Report Sales controller class.
WC_REST_Report_Top_Sellers_V2_Controller
REST API Report Top Sellers controller class.
WC_REST_Reports_V2_Controller
REST API Reports controller class.
WC_REST_Setting_Options_V2_Controller
REST API Setting Options controller class.
WC_REST_Settings_V2_Controller
REST API Settings controller class.
WC_REST_Shipping_Methods_V2_Controller
Shipping methods controller class.
WC_REST_Shipping_Zone_Locations_V2_Controller
REST API Shipping Zone Locations class.
WC_REST_Shipping_Zone_Methods_V2_Controller
REST API Shipping Zone Methods class.
WC_REST_Shipping_Zones_V2_Controller
REST API Shipping Zones class.
WC_REST_System_Status_Tools_V2_Controller
System status tools controller.
WC_REST_System_Status_V2_Controller
System status controller class.
WC_REST_Tax_Classes_V2_Controller
REST API Tax Classes controller class.
WC_REST_Taxes_V2_Controller
REST API Taxes controller class.
WC_REST_Webhook_Deliveries_V2_Controller
REST API Webhook Deliveries controller class.
WC_REST_Webhooks_V2_Controller
REST API Webhooks controller class.
WC_REST_Controller
Abstract Rest Controller Class
WC_REST_Coupons_Controller
REST API Coupons controller class.
WC_REST_CRUD_Controller
WC_REST_CRUD_Controller class.
WC_REST_Customer_Downloads_Controller
REST API Customers controller class.
WC_REST_Customers_Controller
REST API Customers controller class.
WC_REST_Data_Continents_Controller
REST API Data continents controller class.
WC_REST_Data_Controller
REST API Data controller class.
WC_REST_Data_Countries_Controller
REST API Data countries controller class.
WC_REST_Data_Currencies_Controller
REST API Data Currencies controller class.
WC_REST_Network_Orders_Controller
REST API Network Orders controller class.
WC_REST_Order_Notes_Controller
REST API Order Notes controller class.
WC_REST_Order_Refunds_Controller
REST API Order Refunds controller class.
WC_REST_Orders_Controller
REST API Orders controller class.
WC_REST_Payment_Gateways_Controller
Paymenga gateways controller class.
WC_REST_Posts_Controller
WC_REST_Posts_Controller
WC_REST_Product_Attribute_Terms_Controller
REST API Product Attribute Terms controller class.
WC_REST_Product_Attributes_Controller
REST API Product Attributes controller class.
WC_REST_Product_Categories_Controller
REST API Product Categories controller class.
WC_REST_Product_Reviews_Controller
REST API Product Reviews Controller Class.
WC_REST_Product_Shipping_Classes_Controller
REST API Product Shipping Classes controller class.
WC_REST_Product_Tags_Controller
REST API Product Tags controller class.
WC_REST_Product_Variations_Controller
REST API variations controller class.
WC_REST_Products_Controller
REST API Products controller class.
WC_REST_Report_Coupons_Totals_Controller
REST API Reports Coupons Totals controller class.
WC_REST_Report_Customers_Totals_Controller
REST API Reports Customers Totals controller class.
WC_REST_Report_Orders_Totals_Controller
REST API Reports Orders Totals controller class.
WC_REST_Report_Products_Totals_Controller
REST API Reports Products Totals controller class.
WC_REST_Report_Reviews_Totals_Controller
REST API Reports Reviews Totals controller class.
WC_REST_Report_Sales_Controller
REST API Report Sales controller class.
WC_REST_Report_Top_Sellers_Controller
REST API Report Top Sellers controller class.
WC_REST_Reports_Controller
REST API Reports controller class.
WC_REST_Setting_Options_Controller
REST API Setting Options controller class.
WC_REST_Settings_Controller
REST API Settings controller class.
WC_REST_Shipping_Methods_Controller
Shipping methods controller class.
WC_REST_Shipping_Zone_Locations_Controller
REST API Shipping Zone Locations class.
WC_REST_Shipping_Zone_Methods_Controller
REST API Shipping Zone Methods class.
WC_REST_Shipping_Zones_Controller_Base
REST API Shipping Zones base class.
WC_REST_Shipping_Zones_Controller
REST API Shipping Zones class.
WC_REST_System_Status_Controller
System status controller class.
WC_REST_System_Status_Tools_Controller
System status tools controller.
WC_REST_Tax_Classes_Controller
REST API Tax Classes controller class.
WC_REST_Taxes_Controller
REST API Taxes controller class.
WC_REST_Terms_Controller
Terms controller class.
WC_REST_Webhooks_Controller
REST API Webhooks controller class.
WC_Item_Totals
Trait WC_Item_Totals.

Table of Contents

wc_importer_current_locale() Importer current locale.
wc_importer_default_english_mappings() Add English mapping placeholders when not using English as current language.
wc_importer_default_special_english_mappings() Add English special mapping placeholders when not using English as current language.
wc_importer_generic_mappings() Add generic mappings.
wc_importer_shopify_mappings() Add Shopify mappings.
wc_importer_shopify_special_mappings() Add special wildcard Shopify mappings.
wc_importer_shopify_expand_data() Expand special Shopify columns to WC format.
wc_importer_wordpress_mappings() Add mappings for WordPress tables.
wc_get_screen_ids() Get all WooCommerce screen ids.
wc_create_page() Create a page and store the ID in an option.
woocommerce_admin_fields() Output admin fields.
woocommerce_update_options() Update all settings which are passed.
woocommerce_settings_get_option() Get a setting from the settings API.
wc_maybe_adjust_line_item_product_stock() Sees if line item stock has already reduced stock, and whether those values need adjusting e.g. after changing item qty.
wc_save_order_items() Save order items. Uses the CRUD.
wc_render_action_buttons() Get HTML for some action buttons. Used in list tables.
wc_render_invalid_variation_notice() Shows a notice if variations are missing prices.
woocommerce_wp_text_input() Output a text input box.
woocommerce_wp_hidden_input() Output a hidden input box.
woocommerce_wp_textarea_input() Output a textarea input box.
woocommerce_wp_checkbox() Output a checkbox input box.
woocommerce_wp_select() Output a select input box.
woocommerce_wp_radio() Output a radio input box.
wc_lostpassword_url() Returns the url to the lost password endpoint url.
wc_customer_edit_account_url() Get the link to the edit account details page.
wc_edit_address_i18n() Get the edit address slug translation.
wc_get_account_menu_items() Get My Account menu items.
wc_get_account_menu_item_classes() Get account menu item classes.
wc_get_account_endpoint_url() Get account endpoint URL.
wc_get_account_orders_columns() Get My Account > Orders columns.
wc_get_account_downloads_columns() Get My Account > Downloads columns.
wc_get_account_payment_methods_columns() Get My Account > Payment methods columns.
wc_get_account_payment_methods_types() Get My Account > Payment methods types
wc_get_account_orders_actions() Get account orders actions.
wc_get_account_formatted_address() Get account formatted address.
wc_get_account_saved_payment_methods_list() Returns an array of a user's saved payments list for output on the account tab.
wc_get_account_saved_payment_methods_list_item_cc() Controls the output for credit cards on the my account page.
wc_get_account_saved_payment_methods_list_item_echeck() Controls the output for eChecks on the my account page.
wc_get_text_attributes() Gets text attributes from a string.
wc_get_text_attributes_filter_callback() See if an attribute is actually valid.
wc_implode_text_attributes() Implode an array of attributes using WC_DELIMITER.
wc_get_attribute_taxonomies() Get attribute taxonomies.
wc_get_attribute_taxonomy_ids() Get (cached) attribute taxonomy ID and name pairs.
wc_get_attribute_taxonomy_labels() Get (cached) attribute taxonomy label and name pairs.
wc_attribute_taxonomy_name() Get a product attribute name.
wc_variation_attribute_name() Get the attribute name used when storing values in post meta.
wc_attribute_taxonomy_name_by_id() Get a product attribute name by ID.
wc_attribute_taxonomy_id_by_name() Get a product attribute ID by name.
wc_attribute_label() Get a product attributes label.
wc_attribute_orderby() Get a product attributes orderby setting.
wc_get_attribute_taxonomy_names() Get an array of product attribute taxonomies.
wc_get_attribute_types() Get attribute types.
wc_has_custom_attribute_types() Check if there are custom attribute types.
wc_get_attribute_type_label() Get attribute type label.
wc_check_if_attribute_name_is_reserved() Check if attribute name is reserved.
wc_attributes_array_filter_visible() Callback for array filter to get visible only.
wc_attributes_array_filter_variation() Callback for array filter to get variation attributes only.
wc_is_attribute_in_product_name() Check if an attribute is included in the attributes area of a variation name.
wc_array_filter_default_attributes() Callback for array filter to get default attributes. Will allow for '0' string values, but regard all other class PHP FALSE equivalents normally.
wc_get_attribute() Get attribute data by ID.
wc_create_attribute() Create attribute.
wc_update_attribute() Update an attribute.
wc_delete_attribute() Delete attribute by ID.
wc_attribute_taxonomy_slug() Get an unprefixed product attribute name.
wc_protected_product_add_to_cart() Prevent password protected products being added to the cart.
wc_empty_cart() Clears the cart session when called.
wc_load_persistent_cart() Load the persistent cart.
wc_get_raw_referer() Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.
wc_add_to_cart_message() Add to cart messages.
wc_format_list_of_items() Comma separate a list of item names, and replace final comma with 'and'.
wc_clear_cart_after_payment() Clear cart after payment.
wc_cart_totals_subtotal_html() Get the subtotal.
wc_cart_totals_shipping_html() Get shipping methods.
wc_cart_totals_taxes_total_html() Get taxes total.
wc_cart_totals_coupon_label() Get a coupon label.
wc_cart_totals_coupon_html() Get coupon display HTML.
wc_cart_totals_order_total_html() Get order total html including inc tax if needed.
wc_cart_totals_fee_html() Get the fee value.
wc_cart_totals_shipping_method_label() Get a shipping methods full label including price.
wc_cart_round_discount() Round discount.
wc_get_chosen_shipping_method_ids() Gets chosen shipping method IDs from chosen_shipping_methods session, without instance IDs.
wc_get_chosen_shipping_method_for_package() Get chosen method for package from session.
wc_get_default_shipping_method_for_package() Choose the default method for a package.
wc_shipping_methods_have_changed() See if the methods have changed since the last request.
wc_get_cart_item_data_hash() Gets a hash of important product data that when changed should cause cart items to be invalidated.
is_woocommerce() Is_woocommerce - Returns true if on a page which uses WooCommerce templates (cart and checkout are standard pages with shortcodes and thus are not included).
is_shop() Is_shop - Returns true when viewing the product type archive (shop).
is_product_taxonomy() Is_product_taxonomy - Returns true when viewing a product taxonomy archive.
is_product_category() Is_product_category - Returns true when viewing a product category.
is_product_tag() Is_product_tag - Returns true when viewing a product tag.
is_product() Is_product - Returns true when viewing a single product.
is_cart() Is_cart - Returns true when viewing the cart page.
is_checkout() Is_checkout - Returns true when viewing the checkout page.
is_checkout_pay_page() Is_checkout_pay - Returns true when viewing the checkout's pay page.
is_wc_endpoint_url() Is_wc_endpoint_url - Check if an endpoint is showing.
is_account_page() Is_account_page - Returns true when viewing an account page.
is_view_order_page() Is_view_order_page - Returns true when on the view order page.
is_edit_account_page() Check for edit account page.
is_order_received_page() Is_order_received_page - Returns true when viewing the order received page.
is_add_payment_method_page() Is_add_payment_method_page - Returns true when viewing the add payment method page.
is_lost_password_page() Is_lost_password_page - Returns true when viewing the lost password page.
is_ajax() Is_ajax - Returns true when the page is loaded via ajax.
is_store_notice_showing() Is_store_notice_showing - Returns true when store notice is active.
is_filtered() Is_filtered - Returns true when filtering products using layered nav or price sliders.
taxonomy_is_product_attribute() Returns true when the passed taxonomy name is a product attribute.
meta_is_product_attribute() Returns true when the passed meta name is a product attribute.
wc_tax_enabled() Are store-wide taxes enabled?
wc_shipping_enabled() Is shipping enabled?
wc_prices_include_tax() Are prices inclusive of tax?
wc_is_valid_url() Simple check for validating a URL, it must start with http:// or https://.
wc_site_is_https() Check if the home URL is https. If it is, we don't need to do things such as 'force ssl'.
wc_checkout_is_https() Check if the checkout is configured for https. Look at options, WP HTTPS plugin, or the permalink itself.
wc_post_content_has_shortcode() Checks whether the content passed contains a specific short code.
wc_reviews_enabled() Check if reviews are enabled.
wc_review_ratings_enabled() Check if reviews ratings are enabled.
wc_review_ratings_required() Check if review ratings are required.
wc_is_file_valid_csv() Check if a CSV file is valid.
wc_maybe_define_constant() Define a constant if it is not already defined.
wc_create_order() Create a new order programmatically.
wc_update_order() Update an order. Uses wc_create_order.
wc_tokenize_path() Given a path, this will convert any of the subpaths into their corresponding tokens.
wc_untokenize_path() Given a tokenized path, this will expand the tokens to their full path.
wc_get_path_define_tokens() Fetches an array containing all of the configurable path constants to be used in tokenization.
wc_get_template_part() Get template part (for templates like the shop-loop).
wc_get_template() Get other templates (e.g. product attributes) passing attributes and including the file.
wc_get_template_html() Like wc_get_template, but returns the HTML instead of outputting.
wc_locate_template() Locate a template and return the path for inclusion.
wc_set_template_cache() Add a template to the template cache.
wc_clear_template_cache() Clear the template cache.
get_woocommerce_currency() Get Base Currency Code.
get_woocommerce_currencies() Get full list of currency codes.
get_woocommerce_currency_symbols() Get all available Currency symbols.
get_woocommerce_currency_symbol() Get Currency symbol.
wc_mail() Send HTML emails from WooCommerce.
wc_get_theme_support() Return "theme support" values from the current theme, if set.
wc_get_image_size() Get an image size by name or defined dimensions.
wc_enqueue_js() Queue some JavaScript code to be output in the footer.
wc_print_js() Output any queued javascript code in the footer.
wc_setcookie() Set a cookie - wrapper for setcookie using WP constants.
get_woocommerce_api_url() Get the URL to the WooCommerce REST API.
wc_get_log_file_path() Get a log file path.
wc_get_log_file_name() Get a log file name.
wc_get_page_children() Recursively get page children.
flush_rewrite_rules_on_shop_page_save() Flushes rewrite rules when the shop page (or it's children) gets saved.
wc_fix_rewrite_rules() Various rewrite rule fixes.
wc_fix_product_attachment_link() Prevent product attachment links from breaking when using complex rewrite structures.
wc_ms_protect_download_rewite_rules() Protect downloads from ms-files.php in multisite.
wc_format_country_state_string() Formats a string in the format COUNTRY:STATE into an array.
wc_get_base_location() Get the store's base location.
wc_get_customer_default_location() Get the customer's default location.
wc_get_user_agent() Get user agent string.
wc_rand_hash() Generate a rand hash.
wc_api_hash() WC API - Hash.
wc_array_cartesian() Find all possible combinations of values from the input array and return in a logical order.
wc_transaction_query() Run a MySQL transaction query, if supported.
wc_get_cart_url() Gets the url to the cart page.
wc_get_checkout_url() Gets the url to the checkout page.
woocommerce_register_shipping_method() Register a shipping method.
wc_get_shipping_zone() Get the shipping zone matching a given package from the cart.
wc_get_credit_card_type_label() Get a nice name for credit card providers.
wc_back_link() Outputs a "back" link so admin screens can easily jump back a page.
wc_help_tip() Display a WooCommerce help tip.
wc_get_wildcard_postcodes() Return a list of potential postcodes for wildcard searching.
wc_postcode_location_matcher() Used by shipping zones and taxes to compare a given $postcode to stored postcodes to find matches for numerical ranges, and wildcards.
wc_get_shipping_method_count() Gets number of shipping methods currently enabled. Used to identify if shipping is configured.
wc_set_time_limit() Wrapper for set_time_limit to see if it is enabled.
wc_nocache_headers() Wrapper for nocache_headers which also disables page caching.
wc_product_attribute_uasort_comparison() Used to sort products attributes with uasort.
wc_shipping_zone_method_order_uasort_comparison() Used to sort shipping zone methods with uasort.
wc_checkout_fields_uasort_comparison() User to sort checkout fields based on priority with uasort.
wc_uasort_comparison() User to sort two values with ausort.
wc_ascii_uasort_comparison() Sort values based on ascii, usefull for special chars in strings.
wc_get_tax_rounding_mode() Get rounding mode for internal tax calculations.
wc_get_rounding_precision() Get rounding precision for internal WC calculations.
wc_add_number_precision() Add precision to a number and return a number.
wc_remove_number_precision() Remove precision from a number and return a float.
wc_add_number_precision_deep() Add precision to an array of number and return an array of int.
wc_remove_number_precision_deep() Remove precision from an array of number and return an array of int.
wc_get_logger() Get a shared logger instance.
wc_cleanup_logs() Trigger logging cleanup using the logging class.
wc_print_r() Prints human-readable information about a variable.
wc_register_default_log_handler() Registers the default log handler.
wc_list_pluck() Based on wp_list_pluck, this calls a method instead of returning a property.
wc_get_permalink_structure() Get permalink settings for things like products and taxonomies.
wc_switch_to_site_locale() Switch WooCommerce to site language.
wc_restore_locale() Switch WooCommerce language to original.
wc_make_phone_clickable() Convert plaintext phone number to clickable phone number.
wc_get_post_data_by_key() Get an item of post data if set, otherwise return a default value.
wc_get_var() Get data if set, otherwise return a default value or null. Prevents notices when data is not set.
wc_enable_wc_plugin_headers() Read in WooCommerce headers when reading plugin headers.
wc_prevent_dangerous_auto_updates() Prevent auto-updating the WooCommerce plugin on major releases if there are untested extensions active.
wc_delete_expired_transients() Delete expired transients.
wc_get_relative_url() Make a URL relative, if possible.
wc_is_external_resource() See if a resource is remote.
wc_is_active_theme() See if theme/s is activate or not.
wc_is_wp_default_theme_active() Is the site using a default WP theme?
wc_cleanup_session_data() Cleans up session data - cron callback.
wc_decimal_to_fraction() Convert a decimal (e.g. 3.5) to a fraction (e.g. 7/2).
wc_round_discount() Round discount.
wc_selected() Return the html selected attribute if stringified $value is found in array of stringified $options or if stringified $value is the same as scalar stringified $options.
wc_get_server_database_version() Retrieves the MySQL server version. Based on $wpdb.
wc_load_cart() Initialize and load the cart functionality.
wc_is_running_from_async_action_scheduler() Test whether the context of execution comes from async action scheduler.
wc_get_coupon_types() Get coupon types.
wc_get_coupon_type() Get a coupon type's name.
wc_get_product_coupon_types() Coupon types that apply to individual products. Controls which validation rules will apply.
wc_get_cart_coupon_types() Coupon types that apply to the cart as a whole. Controls which validation rules will apply.
wc_coupons_enabled() Check if coupons are enabled.
wc_get_coupon_code_by_id() Get coupon code by ID.
wc_get_coupon_id_by_code() Get coupon code by ID.
wc_do_deprecated_action() Runs a deprecated action with notice only if used.
wc_deprecated_function() Wrapper for deprecated functions so we can apply some extra logic.
wc_deprecated_hook() Wrapper for deprecated hook so we can apply some extra logic.
wc_caught_exception() When catching an exception, this allows us to log it if unexpected.
wc_doing_it_wrong() Wrapper for _doing_it_wrong().
wc_deprecated_argument() Wrapper for deprecated arguments so we can apply some extra logic.
woocommerce_show_messages()
woocommerce_weekend_area_js()
woocommerce_tooltip_js()
woocommerce_datepicker_js()
woocommerce_admin_scripts()
woocommerce_create_page()
woocommerce_readfile_chunked()
woocommerce_format_total() Formal total costs - format to the number of decimal places for the base currency.
woocommerce_get_formatted_product_name() Get product name with extra details such as SKU price and attributes. Used within admin.
woocommerce_legacy_paypal_ipn() Handle IPN requests for the legacy paypal gateway by calling gateways manually if needed.
get_product()
woocommerce_protected_product_add_to_cart()
woocommerce_empty_cart()
woocommerce_load_persistent_cart()
woocommerce_add_to_cart_message()
woocommerce_clear_cart_after_payment()
woocommerce_cart_totals_subtotal_html()
woocommerce_cart_totals_shipping_html()
woocommerce_cart_totals_coupon_html()
woocommerce_cart_totals_order_total_html()
woocommerce_cart_totals_fee_html()
woocommerce_cart_totals_shipping_method_label()
woocommerce_get_template_part()
woocommerce_get_template()
woocommerce_locate_template()
woocommerce_mail()
woocommerce_disable_admin_bar()
woocommerce_create_new_customer()
woocommerce_set_customer_auth_cookie()
woocommerce_update_new_customer_past_orders()
woocommerce_paying_customer()
woocommerce_customer_bought_product()
woocommerce_customer_has_capability()
woocommerce_sanitize_taxonomy_name()
woocommerce_get_filename_from_url()
woocommerce_get_dimension()
woocommerce_get_weight()
woocommerce_trim_zeros()
woocommerce_round_tax_total()
woocommerce_format_decimal()
woocommerce_clean()
woocommerce_array_overlay()
woocommerce_price()
woocommerce_let_to_num()
woocommerce_date_format()
woocommerce_time_format()
woocommerce_timezone_string()
woocommerce_rgb_from_hex()
woocommerce_hex_darker()
woocommerce_hex_lighter()
woocommerce_light_or_dark()
woocommerce_format_hex()
woocommerce_get_order_id_by_order_key()
woocommerce_downloadable_file_permission()
woocommerce_downloadable_product_permissions()
woocommerce_add_order_item()
woocommerce_delete_order_item()
woocommerce_update_order_item_meta()
woocommerce_add_order_item_meta()
woocommerce_delete_order_item_meta()
woocommerce_get_order_item_meta()
woocommerce_cancel_unpaid_orders()
woocommerce_processing_order_count()
woocommerce_get_page_id()
woocommerce_get_endpoint_url()
woocommerce_lostpassword_url()
woocommerce_customer_edit_account_url()
woocommerce_nav_menu_items()
woocommerce_nav_menu_item_classes()
woocommerce_list_pages()
woocommerce_product_dropdown_categories()
woocommerce_walk_category_dropdown_tree()
woocommerce_taxonomy_metadata_wpdbfix()
wc_taxonomy_metadata_wpdbfix()
woocommerce_order_terms()
woocommerce_set_term_order()
woocommerce_terms_clauses()
_woocommerce_term_recount()
woocommerce_recount_after_stock_change()
woocommerce_change_term_counts()
woocommerce_get_product_ids_on_sale()
woocommerce_get_featured_product_ids()
woocommerce_get_product_terms()
woocommerce_product_post_type_link()
woocommerce_placeholder_img_src()
woocommerce_placeholder_img()
woocommerce_get_formatted_variation()
woocommerce_scheduled_sales()
woocommerce_get_attachment_image_attributes()
woocommerce_prepare_attachment_for_js()
woocommerce_track_product_view()
woocommerce_compile_less_styles()
woocommerce_calc_shipping_backwards_compatibility() woocommerce_calc_shipping was an option used to determine if shipping was enabled prior to version 2.6.0. This has since been replaced with wc_shipping_enabled() function and the woocommerce_ship_to_countries setting.
woocommerce_get_product_schema()
_wc_save_product_price() Save product price.
wc_get_customer_avatar_url() Return customer avatar URL.
wc_get_core_supported_themes() WooCommerce Core Supported Themes.
wc_get_min_max_price_meta_query() Get min/max price meta query args.
wc_taxonomy_metadata_update_content_for_split_terms() When a term is split, ensure meta data maintained.
update_woocommerce_term_meta() WooCommerce Term Meta API.
add_woocommerce_term_meta() WooCommerce Term Meta API.
delete_woocommerce_term_meta() WooCommerce Term Meta API
get_woocommerce_term_meta() WooCommerce Term Meta API
wc_string_to_bool() Converts a string (e.g. 'yes' or 'no') to a bool.
wc_bool_to_string() Converts a bool to a 'yes' or 'no'.
wc_string_to_array() Explode a string into an array by $delimiter and remove empty values.
wc_sanitize_taxonomy_name() Sanitize taxonomy names. Slug format (no spaces, lowercase).
wc_sanitize_permalink() Sanitize permalink values before insertion into DB.
wc_get_filename_from_url() Gets the filename part of a download URL.
wc_get_dimension() Normalise dimensions, unify to cm then convert to wanted unit value.
wc_get_weight() Normalise weights, unify to kg then convert to wanted unit value.
wc_trim_zeros() Trim trailing zeros off prices.
wc_round_tax_total() Round a tax amount.
wc_legacy_round_half_down() Round half down in PHP 5.2.
wc_format_refund_total() Make a refund total negative.
wc_format_decimal() Format decimal numbers ready for DB storage.
wc_float_to_string() Convert a float to a string without locale formatting which PHP adds when changing floats to strings.
wc_format_localized_price() Format a price with WC Currency Locale settings.
wc_format_localized_decimal() Format a decimal with PHP Locale settings.
wc_format_coupon_code() Format a coupon code.
wc_sanitize_coupon_code() Sanitize a coupon code.
wc_clean() Clean variables using sanitize_text_field. Arrays are cleaned recursively.
wc_check_invalid_utf8() Function wp_check_invalid_utf8 with recursive array support.
wc_sanitize_textarea() Run wc_clean over posted textarea but maintain line breaks.
wc_sanitize_tooltip() Sanitize a string destined to be a tooltip.
wc_array_overlay() Merge two arrays.
wc_stock_amount() Formats a stock amount by running it through a filter.
get_woocommerce_price_format() Get the price format depending on the currency position.
wc_get_price_thousand_separator() Return the thousand separator for prices.
wc_get_price_decimal_separator() Return the decimal separator for prices.
wc_get_price_decimals() Return the number of decimals after the decimal point.
wc_price() Format the price with a currency symbol.
wc_let_to_num() Notation to numbers.
wc_date_format() WooCommerce Date Format - Allows to change date format for everything WooCommerce.
wc_time_format() WooCommerce Time Format - Allows to change time format for everything WooCommerce.
wc_string_to_timestamp() Convert mysql datetime to PHP timestamp, forcing UTC. Wrapper for strtotime.
wc_string_to_datetime() Convert a date string to a WC_DateTime.
wc_timezone_string() WooCommerce Timezone - helper to retrieve the timezone string for a site until.
wc_timezone_offset() Get timezone offset in seconds.
wc_flatten_meta_callback() Callback which can flatten post meta (gets the first value if it's an array).
wc_rgb_from_hex() Convert RGB to HEX.
wc_hex_darker() Make HEX color darker.
wc_hex_lighter() Make HEX color lighter.
wc_hex_is_light() Determine whether a hex color is light.
wc_light_or_dark() Detect if we should use a light or dark color on a background color.
wc_format_hex() Format string as hex.
wc_format_postcode() Format the postcode according to the country and length of the postcode.
wc_normalize_postcode() Normalize postcodes.
wc_format_phone_number() Format phone numbers.
wc_sanitize_phone_number() Sanitize phone number.
wc_strtoupper() Wrapper for mb_strtoupper which see's if supported first.
wc_strtolower() Make a string lowercase.
wc_trim_string() Trim a string and append a suffix.
wc_format_content() Format content to display shortcodes.
wc_format_product_short_description() Format product short description.
wc_format_option_price_separators() Formats curency symbols when saved in settings.
wc_format_option_price_num_decimals() Formats decimals when saved in settings.
wc_format_option_hold_stock_minutes() Formats hold stock option and sets cron event up.
wc_sanitize_term_text_based() Sanitize terms from an attribute text based.
wc_make_numeric_postcode() Make numeric postcode.
wc_format_stock_for_display() Format the stock amount ready for display based on settings.
wc_format_stock_quantity_for_display() Format the stock quantity ready for display.
wc_format_sale_price() Format a sale price for display.
wc_format_price_range() Format a price range for display.
wc_format_weight() Format a weight for display.
wc_format_dimensions() Format dimensions for display.
wc_format_datetime() Format a date for output.
wc_do_oembeds() Process oEmbeds.
wc_get_string_before_colon() Get part of a string before :.
wc_array_merge_recursive_numeric() Array merge and sum function.
wc_implode_html_attributes() Implode and escape HTML attributes for output.
wc_esc_json() Escape JSON for use on HTML or attribute text nodes.
wc_parse_relative_date_option() Parse a relative date option from the settings API into a standard format.
wc_sanitize_endpoint_slug() Format the endpoint slug, strip out anything not allowed in a url.
wc_notice_count() Get the count of notices added, either for all notices (default) or for one.
wc_has_notice() Check if a notice has already been added.
wc_add_notice() Add and store a notice.
wc_set_notices() Set all notices at once.
wc_clear_notices() Unset all notices.
wc_print_notices() Prints messages and errors which are stored in the session, then clears them.
wc_print_notice() Print a single notice immediately.
wc_get_notices() Returns all queued notices, optionally filtered by a notice type.
wc_add_wp_error_notices() Add notices for WP Errors.
wc_kses_notice() Filters out the same tags as wp_kses_post, but allows tabindex for <a> element.
wc_get_notice_data_attr() Get notice data attribute.
wc_get_orders() Standard way of retrieving orders based on certain parameters.
wc_get_order() Main function for returning orders, uses the WC_Order_Factory class.
wc_get_order_statuses() Get all order statuses.
wc_is_order_status() See if a string is an order status.
wc_get_is_paid_statuses() Get list of statuses which are consider 'paid'.
wc_get_is_pending_statuses() Get list of statuses which are consider 'pending payment'.
wc_get_order_status_name() Get the nice name for an order status.
wc_generate_order_key() Generate an order key.
wc_get_order_id_by_order_key() Finds an Order ID based on an order key.
wc_get_order_types() Get all registered order types.
wc_get_order_type() Get an order type by post type name.
wc_register_order_type() Register order type. Do not use before init.
wc_processing_order_count() Return the count of processing orders.
wc_orders_count() Return the orders count of a specific order status.
wc_downloadable_file_permission() Grant downloadable product access to the file identified by $download_id.
wc_downloadable_product_permissions() Order Status completed - give downloadable product access to customer.
wc_delete_shop_order_transients() Clear all transients cache for order data.
wc_ship_to_billing_address_only() See if we only ship to billing addresses.
wc_create_refund() Create a new order refund programmatically.
wc_refund_payment() Try to refund the payment for an order via the gateway.
wc_restock_refunded_items() Restock items during refund.
wc_get_tax_class_by_tax_id() Get tax class by tax id.
wc_get_payment_gateway_by_order() Get payment gateway class by order data.
wc_order_fully_refunded() When refunding an order, create a refund line item if the partial refunds do not match order total.
wc_order_search() Search orders.
wc_update_total_sales_counts() Update total sales amount for each product within a paid order.
wc_update_coupon_usage_counts() Update used coupon amount for each coupon within an order.
wc_cancel_unpaid_orders() Cancel all unpaid orders after held duration to prevent stock lock for those products.
wc_sanitize_order_id() Sanitize order id removing unwanted characters.
wc_get_order_note() Get an order note.
wc_get_order_notes() Get order notes.
wc_create_order_note() Create an order note.
wc_delete_order_note() Delete an order note.
wc_add_order_item() Add a item to an order (for example a line item).
wc_update_order_item() Update an item for an order.
wc_delete_order_item() Delete an item from the order it belongs to based on item id.
wc_update_order_item_meta() WooCommerce Order Item Meta API - Update term meta.
wc_add_order_item_meta() WooCommerce Order Item Meta API - Add term meta.
wc_delete_order_item_meta() WooCommerce Order Item Meta API - Delete term meta.
wc_get_order_item_meta() WooCommerce Order Item Meta API - Get term meta.
wc_get_order_id_by_order_item_id() Get order ID by order item ID.
wc_page_endpoint_title() Replace a page title with the endpoint title.
wc_get_page_id() Retrieve page ids - used for myaccount, edit_address, shop, cart, checkout, pay, view_order, terms. returns -1 if no page is found.
wc_get_page_permalink() Retrieve page permalink.
wc_get_endpoint_url() Get endpoint URL.
wc_nav_menu_items() Hide menu items conditionally.
wc_nav_menu_item_classes() Fix active class in nav for shop page.
wc_list_pages() Fix active class in wp_list_pages for shop page.
wc_get_products() Standard way of retrieving products based on certain parameters.
wc_get_product() Main function for returning products, uses the WC_Product_Factory class.
wc_get_product_object() Get a product object.
wc_product_sku_enabled() Returns whether or not SKUS are enabled.
wc_product_weight_enabled() Returns whether or not product weights are enabled.
wc_product_dimensions_enabled() Returns whether or not product dimensions (HxWxD) are enabled.
wc_delete_product_transients() Clear transient cache for product data.
wc_get_product_ids_on_sale() Function that returns an array containing the IDs of the products that are on sale.
wc_get_featured_product_ids() Function that returns an array containing the IDs of the featured products.
wc_product_post_type_link() Filter to allow product_cat in the permalinks for products.
wc_placeholder_img_src() Get the placeholder image URL either from media, or use the fallback image.
wc_placeholder_img() Get the placeholder image.
wc_get_formatted_variation() Variation Formatting.
wc_scheduled_sales() Function which handles the start and end of scheduled sales via cron.
wc_get_attachment_image_attributes() Get attachment image attributes.
wc_prepare_attachment_for_js() Prepare attachment for JavaScript.
wc_track_product_view() Track product views.
wc_get_product_types() Get product types.
wc_product_has_unique_sku() Check if product sku is unique.
wc_product_force_unique_sku() Force a unique SKU.
wc_product_generate_unique_sku() Recursively appends a suffix until a unique SKU is found.
wc_get_product_id_by_sku() Get product ID by SKU.
wc_get_product_variation_attributes() Get attibutes/data for an individual variation from the database and maintain it's integrity.
wc_get_product_cat_ids() Get all product cats for a product by ID, including hierarchy
wc_get_product_attachment_props() Gets data about an attachment, such as alt text and captions.
wc_get_product_visibility_options() Get product visibility options.
wc_get_product_tax_class_options() Get product tax class options.
wc_get_product_stock_status_options() Get stock status options.
wc_get_product_backorder_options() Get backorder options.
wc_get_related_products() Get related products based on product category and tags.
wc_get_product_term_ids() Retrieves product term ids for a taxonomy.
wc_get_price_including_tax() For a given product, and optionally price/qty, work out the price with tax included, based on store settings.
wc_get_price_excluding_tax() For a given product, and optionally price/qty, work out the price with tax excluded, based on store settings.
wc_get_price_to_display() Returns the price including or excluding tax, based on the 'woocommerce_tax_display_shop' setting.
wc_get_product_category_list() Returns the product categories in a list.
wc_get_product_tag_list() Returns the product tags in a list.
wc_products_array_filter_visible() Callback for array filter to get visible only.
wc_products_array_filter_visible_grouped() Callback for array filter to get visible grouped products only.
wc_products_array_filter_editable() Callback for array filter to get products the user can edit only.
wc_products_array_filter_readable() Callback for array filter to get products the user can view only.
wc_products_array_orderby() Sort an array of products by a value.
wc_products_array_orderby_title() Sort by title.
wc_products_array_orderby_id() Sort by id.
wc_products_array_orderby_date() Sort by date.
wc_products_array_orderby_modified() Sort by modified.
wc_products_array_orderby_menu_order() Sort by menu order.
wc_products_array_orderby_price() Sort by price low to high.
wc_deferred_product_sync() Queue a product for syncing at the end of the request.
wc_update_product_lookup_tables_is_running() See if the lookup table is being generated already.
wc_update_product_lookup_tables() Populate lookup table data for products.
wc_update_product_lookup_tables_column() Populate lookup table column data.
wc_update_product_lookup_tables_rating_count() Populate rating count lookup table data for products.
wc_update_product_lookup_tables_rating_count_batch() Populate a batch of rating count lookup table data for products.
wc_rest_prepare_date_response() Parses and formats a date for ISO8601/RFC3339.
wc_rest_allowed_image_mime_types() Returns image mime types users are allowed to upload via the API.
wc_rest_upload_image_from_url() Upload image from URL.
wc_rest_set_uploaded_image_as_attachment() Set uploaded image as attachment.
wc_rest_validate_reports_request_arg() Validate reports request arguments.
wc_rest_urlencode_rfc3986() Encodes a value according to RFC 3986.
wc_rest_check_post_permissions() Check permissions of posts on REST API.
wc_rest_check_user_permissions() Check permissions of users on REST API.
wc_rest_check_product_term_permissions() Check permissions of product terms on REST API.
wc_rest_check_manager_permissions() Check manager permissions on REST API.
wc_rest_check_product_reviews_permissions() Check product reviews permissions on REST API.
wc_update_product_stock() Update a product's stock amount.
wc_update_product_stock_status() Update a product's stock status.
wc_maybe_reduce_stock_levels() When a payment is complete, we can reduce stock levels for items within an order.
wc_maybe_increase_stock_levels() When a payment is cancelled, restore stock.
wc_reduce_stock_levels() Reduce stock levels for items within an order, if stock has not already been reduced for the items.
wc_trigger_stock_change_notifications() After stock change events, triggers emails and adds order notes.
wc_increase_stock_levels() Increase stock levels for items within an order.
wc_get_held_stock_quantity() See how much stock is being held in pending orders.
wc_reserve_stock_for_order() Hold stock for an order.
wc_release_stock_for_order() Release held stock for an order.
wc_get_low_stock_amount() Return low stock amount to determine if notification needs to be sent
wc_template_redirect() Handle redirects before content is output - hooked into template_redirect so is_page works.
wc_send_frame_options_header() When loading sensitive checkout or account pages, send a HTTP header to limit rendering of pages to same origin iframes for security reasons.
wc_prevent_endpoint_indexing() No index our endpoints.
wc_prevent_adjacent_posts_rel_link_wp_head() Remove adjacent_posts_rel_link_wp_head - pointless for products.
wc_gallery_noscript() Show the gallery if JS is disabled.
wc_setup_product_data() When the_post is called, put product data into a global.
wc_setup_loop() Sets up the woocommerce_loop global from the passed args or from the main query.
wc_reset_loop() Resets the woocommerce_loop global.
wc_get_loop_prop() Gets a property from the woocommerce_loop global.
wc_set_loop_prop() Sets a property in the woocommerce_loop global.
woocommerce_product_loop() Should the WooCommerce loop be displayed?
wc_generator_tag() Output generator tag to aid debugging.
wc_body_class() Add body classes for WC pages.
wc_no_js() NO JS handling.
wc_product_cat_class() Display the classes for the product cat div.
wc_get_default_products_per_row() Get the default columns setting - this is how many products will be shown per row in loops.
wc_get_default_product_rows_per_page() Get the default rows setting - this is how many product rows will be shown in loops.
wc_reset_product_grid_settings() Reset the product grid settings when a new theme is activated.
wc_get_loop_class() Get classname for woocommerce loops.
wc_get_product_cat_class() Get the classes for the product cat div.
wc_product_post_class() Adds extra post classes for products via the WordPress post_class hook, if used.
wc_get_product_taxonomy_class() Get product taxonomy HTML classes.
wc_get_product_class() Retrieves the classes for the post div as an array.
wc_product_class() Display the classes for the product div.
wc_query_string_form_fields() Outputs hidden form inputs for each query string variable.
wc_terms_and_conditions_page_id() Get the terms and conditons page ID.
wc_privacy_policy_page_id() Get the privacy policy page ID.
wc_terms_and_conditions_checkbox_enabled() See if the checkbox is enabled or not based on the existance of the terms page and checkbox text.
wc_get_terms_and_conditions_checkbox_text() Get the terms and conditons checkbox text, if set.
wc_get_privacy_policy_text() Get the privacy policy text, if set.
wc_terms_and_conditions_checkbox_text() Output t&c checkbox text.
wc_terms_and_conditions_page_content() Output t&c page's content (if set). The page can be set from checkout settings.
wc_checkout_privacy_policy_text() Render privacy policy text on the checkout.
wc_registration_privacy_policy_text() Render privacy policy text on the register forms.
wc_privacy_policy_text() Output privacy policy text. This is custom text which can be added via the customizer/privacy settings section.
wc_replace_policy_page_link_placeholders() Replaces placeholders with links to WooCommerce policy pages.
woocommerce_content() Output WooCommerce content.
woocommerce_output_content_wrapper() Output the start of the page wrapper.
woocommerce_output_content_wrapper_end() Output the end of the page wrapper.
woocommerce_get_sidebar() Get the shop sidebar template.
woocommerce_demo_store() Adds a demo store banner to the site if enabled.
woocommerce_page_title() Page Title function.
woocommerce_product_loop_start() Output the start of a product loop. By default this is a UL.
woocommerce_product_loop_end() Output the end of a product loop. By default this is a UL.
woocommerce_template_loop_product_title() Show the product title in the product loop. By default this is an H2.
woocommerce_template_loop_category_title() Show the subcategory title in the product loop.
woocommerce_template_loop_product_link_open() Insert the opening anchor tag for products in the loop.
woocommerce_template_loop_product_link_close() Insert the closing anchor tag for products in the loop.
woocommerce_template_loop_category_link_open() Insert the opening anchor tag for categories in the loop.
woocommerce_template_loop_category_link_close() Insert the closing anchor tag for categories in the loop.
woocommerce_taxonomy_archive_description() Show an archive description on taxonomy archives.
woocommerce_product_archive_description() Show a shop page description on product archives.
woocommerce_template_loop_add_to_cart() Get the add to cart template for the loop.
woocommerce_template_loop_product_thumbnail() Get the product thumbnail for the loop.
woocommerce_template_loop_price() Get the product price for the loop.
woocommerce_template_loop_rating() Display the average rating in the loop.
woocommerce_show_product_loop_sale_flash() Get the sale flash for the loop.
woocommerce_get_product_thumbnail() Get the product thumbnail, or the placeholder if not set.
woocommerce_result_count() Output the result count text (Showing x - x of x results).
woocommerce_catalog_ordering() Output the product sorting options.
woocommerce_pagination() Output the pagination.
woocommerce_show_product_images() Output the product image before the single product summary.
woocommerce_show_product_thumbnails() Output the product thumbnails.
wc_get_gallery_image_html() Get HTML for a gallery image.
woocommerce_output_product_data_tabs() Output the product tabs.
woocommerce_template_single_title() Output the product title.
woocommerce_template_single_rating() Output the product rating.
woocommerce_template_single_price() Output the product price.
woocommerce_template_single_excerpt() Output the product short description (excerpt).
woocommerce_template_single_meta() Output the product meta.
woocommerce_template_single_sharing() Output the product sharing.
woocommerce_show_product_sale_flash() Output the product sale flash.
woocommerce_template_single_add_to_cart() Trigger the single product add to cart action.
woocommerce_simple_add_to_cart() Output the simple product add to cart area.
woocommerce_grouped_add_to_cart() Output the grouped product add to cart area.
woocommerce_variable_add_to_cart() Output the variable product add to cart area.
woocommerce_external_add_to_cart() Output the external product add to cart area.
woocommerce_quantity_input() Output the quantity input for add to cart forms.
woocommerce_product_description_tab() Output the description tab content.
woocommerce_product_additional_information_tab() Output the attributes tab content.
woocommerce_default_product_tabs() Add default product tabs to product pages.
woocommerce_sort_product_tabs() Sort tabs by priority.
woocommerce_comments() Output the Review comments template.
woocommerce_review_display_gravatar() Display the review authors gravatar
woocommerce_review_display_rating() Display the reviewers star rating
woocommerce_review_display_meta() Display the review authors meta (name, verified owner, review date)
woocommerce_review_display_comment_text() Display the review content.
woocommerce_output_related_products() Output the related products.
woocommerce_related_products() Output the related products.
woocommerce_upsell_display() Output product up sells.
woocommerce_shipping_calculator() Output the cart shipping calculator.
woocommerce_cart_totals() Output the cart totals.
woocommerce_cross_sell_display() Output the cart cross-sells.
woocommerce_button_proceed_to_checkout() Output the proceed to checkout button.
woocommerce_widget_shopping_cart_button_view_cart() Output the view cart button.
woocommerce_widget_shopping_cart_proceed_to_checkout() Output the proceed to checkout button.
woocommerce_widget_shopping_cart_subtotal() Output to view cart subtotal.
woocommerce_mini_cart() Output the Mini-cart - used by cart widget.
woocommerce_login_form() Output the WooCommerce Login Form.
woocommerce_checkout_login_form() Output the WooCommerce Checkout Login Form.
woocommerce_breadcrumb() Output the WooCommerce Breadcrumb.
woocommerce_order_review() Output the Order review table for the checkout.
woocommerce_checkout_payment() Output the Payment Methods on the checkout.
woocommerce_checkout_coupon_form() Output the Coupon form for the checkout.
woocommerce_products_will_display() Check if we will be showing products or not (and not sub-categories only).
woocommerce_get_loop_display_mode() See what is going to display in the loop.
woocommerce_maybe_show_product_subcategories() Maybe display categories before, or instead of, a product loop.
woocommerce_product_subcategories() This is a legacy function which used to check if we needed to display subcats and then output them. It was called by templates.
woocommerce_output_product_categories() Display product sub categories as thumbnails.
woocommerce_get_product_subcategories() Get (and cache) product subcategories.
woocommerce_subcategory_thumbnail() Show subcategory thumbnails.
woocommerce_order_details_table() Displays order details in a table.
woocommerce_order_downloads_table() Displays order downloads in a table.
woocommerce_order_again_button() Display an 'order again' button on the view order page.
woocommerce_form_field() Outputs a checkout/address form field.
get_product_search_form() Display product search form.
woocommerce_output_auth_header() Output the Auth header.
woocommerce_output_auth_footer() Output the Auth footer.
woocommerce_single_variation() Output placeholders for the single variation.
woocommerce_single_variation_add_to_cart_button() Output the add to cart button for variations.
wc_dropdown_variation_attribute_options() Output a list of variation attributes for use in the cart forms.
woocommerce_account_content() My Account content output.
woocommerce_account_navigation() My Account navigation template.
woocommerce_account_orders() My Account > Orders template.
woocommerce_account_view_order() My Account > View order template.
woocommerce_account_downloads() My Account > Downloads template.
woocommerce_account_edit_address() My Account > Edit address template.
woocommerce_account_payment_methods() My Account > Downloads template.
woocommerce_account_add_payment_method() My Account > Add payment method template.
woocommerce_account_edit_account() My Account > Edit account template.
wc_no_products_found() Handles the loop when no products were found/no product exist.
wc_get_email_order_items() Get HTML for the order items to be shown in emails.
wc_display_item_meta() Display item meta data.
wc_display_item_downloads() Display item download links.
woocommerce_photoswipe() Get the shop sidebar template.
wc_display_product_attributes() Outputs a list of product attributes for a product.
wc_get_stock_html() Get HTML to show product stock.
wc_get_rating_html() Get HTML for ratings.
wc_get_star_rating_html() Get HTML for star rating.
wc_get_price_html_from_text() Returns a 'from' prefix if you want to show where prices start at.
wc_logout_url() Get logout endpoint.
wc_empty_cart_message() Show notice if cart is empty.
wc_page_noindex() Disable search engines indexing core, dynamic, cart/checkout pages.
wc_get_theme_slug_for_templates() Get a slug identifying the current theme.
wc_get_formatted_cart_item_data() Gets and formats a list of cart item data + variations for display on the frontend.
wc_get_cart_remove_url() Gets the url to remove an item from the cart.
wc_get_cart_undo_url() Gets the url to re-add an item into the cart.
woocommerce_output_all_notices() Outputs all queued notices on WC pages.
wc_products_rss_feed() Products RSS Feed.
woocommerce_reset_loop() Reset the loop's index and columns when we're done outputting a product loop.
woocommerce_product_reviews_tab() Output the reviews tab content.
wc_get_pay_buttons() Display pay buttons HTML.
wc_change_get_terms_defaults() Change get terms defaults for attributes to order by the sorting setting, or default to menu_order for sortable taxonomies.
wc_change_pre_get_terms() Adds support to get_terms for menu_order argument.
wc_terms_clauses() Adjust term query to handle custom sorting parameters.
wc_get_object_terms() Helper to get cached object terms and filter by field using wp_list_pluck().
_wc_get_cached_product_terms() Cached version of wp_get_post_terms().
wc_get_product_terms() Wrapper used to get terms for a product.
_wc_get_product_terms_name_num_usort_callback() Sort by name (numeric).
_wc_get_product_terms_parent_usort_callback() Sort by parent.
wc_product_dropdown_categories() WooCommerce Dropdown categories.
wc_walk_category_dropdown_tree() Custom walker for Product Categories.
wc_taxonomy_metadata_migrate_data() Migrate data from WC term meta to WP term meta.
wc_reorder_terms() Move a term before the a given element of its hierarchy level.
wc_set_term_order() Set the sort order of a term.
_wc_term_recount() Function for recounting product terms, ignoring hidden products.
wc_recount_after_stock_change() Recount terms after the stock amount changes.
wc_change_term_counts() Overrides the original term count for product categories and tags with the product count.
wc_get_term_product_ids() Return products in a given term, and cache value.
wc_clear_term_product_ids() When a post is updated and terms recounted (called by _update_post_term_count), clear the ids.
wc_get_product_visibility_term_ids() Get full list of product visibilty term ids.
wc_update_200_file_paths() Update file paths for 2.0
wc_update_200_permalinks() Update permalinks for 2.0
wc_update_200_subcat_display() Update sub-category display options for 2.0
wc_update_200_taxrates() Update tax rates for 2.0
wc_update_200_line_items() Update order item line items for 2.0
wc_update_200_images() Update image settings for 2.0
wc_update_200_db_version() Update DB version for 2.0
wc_update_209_brazillian_state() Update Brazilian States for 2.0.9
wc_update_209_db_version() Update DB version for 2.0.9
wc_update_210_remove_pages() Remove pages for 2.1
wc_update_210_file_paths() Update file paths to support multiple files for 2.1
wc_update_210_db_version() Update DB version for 2.1
wc_update_220_shipping() Update shipping options for 2.2
wc_update_220_order_status() Update order statuses for 2.2
wc_update_220_variations() Update variations for 2.2
wc_update_220_attributes() Update attributes for 2.2
wc_update_220_db_version() Update DB version for 2.2
wc_update_230_options() Update options for 2.3
wc_update_230_db_version() Update DB version for 2.3
wc_update_240_options() Update calc discount options for 2.4
wc_update_240_shipping_methods() Update shipping methods for 2.4
wc_update_240_api_keys() Update API keys for 2.4
wc_update_240_webhooks() Update webhooks for 2.4
wc_update_240_refunds() Update refunds for 2.4
wc_update_240_db_version() Update DB version for 2.4
wc_update_241_variations() Update variations for 2.4.1
wc_update_241_db_version() Update DB version for 2.4.1
wc_update_250_currency() Update currency settings for 2.5
wc_update_250_db_version() Update DB version for 2.5
wc_update_260_options() Update ship to countries options for 2.6
wc_update_260_termmeta() Update term meta for 2.6
wc_update_260_zones() Update zones for 2.6
wc_update_260_zone_methods() Update zone methods for 2.6
wc_update_260_refunds() Update refunds for 2.6
wc_update_260_db_version() Update DB version for 2.6
wc_update_300_webhooks() Update webhooks for 3.0
wc_update_300_comment_type_index() Add an index to the field comment_type to improve the response time of the query used by WC_Comments::wp_count_comments() to get the number of comments by type.
wc_update_300_grouped_products() Update grouped products for 3.0
wc_update_300_settings() Update shipping tax classes for 3.0
wc_update_300_product_visibility() Convert meta values into term for product visibility.
wc_update_300_db_version() Update DB Version.
wc_update_310_downloadable_products() Add an index to the downloadable product permissions table to improve performance of update_user_by_order_id.
wc_update_310_old_comments() Find old order notes and ensure they have the correct type for exclusion.
wc_update_310_db_version() Update DB Version.
wc_update_312_shop_manager_capabilities() Update shop_manager capabilities.
wc_update_312_db_version() Update DB Version.
wc_update_320_mexican_states() Update state codes for Mexico.
wc_update_320_db_version() Update DB Version.
wc_update_330_image_options() Update image settings to use new aspect ratios and widths.
wc_update_330_webhooks() Migrate webhooks from post type to CRUD.
wc_update_330_set_default_product_cat() Assign default cat to all products with no cats.
wc_update_330_product_stock_status() Update product stock status to use the new onbackorder status.
wc_update_330_clear_transients() Clear addons page transients
wc_update_330_set_paypal_sandbox_credentials() Set PayPal's sandbox credentials.
wc_update_330_db_version() Update DB Version.
wc_update_340_states() Update state codes for Ireland and BD.
wc_update_340_state() Update next state in the queue.
wc_update_340_last_active() Set last active prop for users.
wc_update_340_db_version() Update DB Version.
wc_update_343_cleanup_foreign_keys() Remove duplicate foreign keys
wc_update_343_db_version() Update DB version.
wc_update_344_recreate_roles() Recreate user roles so existing users will get the new capabilities.
wc_update_344_db_version() Update DB version.
wc_update_350_reviews_comment_type() Set the comment type to 'review' for product reviews that don't have a comment type.
wc_update_350_db_version() Update DB Version.
wc_update_352_drop_download_log_fk() Drop the fk_wc_download_log_permission_id FK as we use a new one with the table and blog prefix for MS compatability.
wc_update_354_modify_shop_manager_caps() Remove edit_user capabilities from shop managers and use "translated" capabilities instead.
wc_update_354_db_version() Update DB Version.
wc_update_360_product_lookup_tables() Update product lookup tables in bulk.
wc_update_360_term_meta() Renames ordering meta to be consistent across taxonomies.
wc_update_360_downloadable_product_permissions_index() Add new user_order_remaining_expires to speed up user download permission fetching.
wc_update_360_db_version() Update DB Version.
wc_update_370_tax_rate_classes() Put tax classes into a DB table.
wc_update_370_mro_std_currency() Update currency settings for 3.7.0
wc_update_370_db_version() Update DB Version.
wc_update_390_move_maxmind_database() We've moved the MaxMind database to a new location, as per the TOS' requirement that the database not be publicly accessible.
wc_update_390_change_geolocation_database_update_cron() So that we can best meet MaxMind's TOS, the geolocation database update cron should run once per 15 days.
wc_update_390_db_version() Update DB version.
wc_update_400_increase_size_of_column() Increase column size
wc_update_400_reset_action_scheduler_migration_status() Reset ActionScheduler migration status. Needs AS >= 3.0 shipped with WC >= 4.0.
wc_update_400_db_version() Update DB version.
wc_disable_admin_bar() Prevent any user who cannot 'edit_posts' (subscribers, customers etc) from seeing the admin bar.
wc_create_new_customer() Create a new customer.
wc_create_new_customer_username() Create a unique username for a new customer.
wc_set_customer_auth_cookie() Login a customer (set auth cookie and set global user object).
wc_update_new_customer_past_orders() Get past orders (by email) and update them.
wc_paying_customer() Order payment completed - This is a paying customer.
wc_customer_bought_product() Checks if a user (by email or ID or both) has bought an item.
wc_current_user_has_role() Checks if the current user has a role.
wc_user_has_role() Checks if a user has a role.
wc_customer_has_capability() Checks if a user has a certain capability.
wc_shop_manager_has_capability() Safe way of allowing shop managers restricted capabilities that will remove access to the capabilities if WooCommerce is deactivated.
wc_modify_editable_roles() Modify the list of editable roles to prevent non-admin adding admin users.
wc_modify_map_meta_cap() Modify capabilities to prevent non-admin users editing admin users.
wc_get_customer_download_permissions() Get customer download permissions from the database.
wc_get_customer_available_downloads() Get customer available downloads.
wc_get_customer_total_spent() Get total spent by customer.
wc_get_customer_order_count() Get total orders by customer.
wc_reset_order_customer_id_on_deleted_user() Reset _customer_user on orders when a user is deleted.
wc_review_is_from_verified_owner() Get review verification status.
wc_disable_author_archives_for_customers() Disable author archives for customers.
wc_update_profile_last_update_time() Hooks into the `profile_update` hook to set the user last updated timestamp.
wc_meta_update_last_update_time() Hooks into the update user meta function to set the user last updated timestamp.
wc_set_user_last_update_time() Sets a user's "last update" time to the current timestamp.
wc_get_customer_saved_methods_list() Get customer saved payment methods list.
wc_get_customer_last_order() Get info about customer's last order.
wc_user_search_columns() Add support for searching by display_name.
wc_delete_user_data() When a user is deleted in WordPress, delete corresponding WooCommerce data.
wc_maybe_store_user_agent() Store user agents. Used for tracker.
wc_user_logged_in() Update logic triggered on login.
wc_current_user_is_active() Update when the user was last active.
wc_update_user_last_active() Set the user last active timestamp to now.
wc_translate_user_roles() Translate WC roles using the woocommerce textdomain.
wc_webhook_process_delivery() Process webhook delivery.
wc_deliver_webhook_async() Wrapper function to execute the `woocommerce_deliver_webhook_async` cron.
wc_is_webhook_valid_topic() Check if the given topic is a valid webhook topic, a topic is valid if:
wc_is_webhook_valid_status() Check if given status is a valid webhook status.
wc_get_webhook_statuses() Get Webhook statuses.
wc_load_webhooks() Load webhooks.
wc_get_webhook() Get webhook.
wc_get_webhook_rest_api_versions() Get webhoook REST API versions.
wc_register_widgets() Register Widgets.
wc_admin_get_core_pages_to_connect() Returns core WC pages to connect to WC-Admin.
wc_admin_filter_core_page_breadcrumbs() Filter breadcrumbs for core pages that aren't explicitly connected.
wc_admin_connect_core_pages() Render the WC-Admin header bar on all WooCommerce core pages.
wc_admin_number_format() Format a number using the decimal and thousands separator settings in WooCommerce.
wc_admin_url() Retrieves a URL to relative path inside WooCommerce admin with the provided query parameters.
wc_admin_get_feature_config()
wc_admin_connect_page() Connect an existing page to WooCommerce Admin.
wc_admin_register_page() Register JS-powered WooCommerce Admin Page.
wc_admin_is_connected_page() Is this page connected to WooCommerce Admin? Passthrough to PageController::is_connected_page().
wc_admin_is_registered_page() Is this a WooCommerce Admin Page? Passthrough to PageController::is_registered_page().
wc_admin_get_breadcrumbs() Get breadcrumbs for WooCommerce Admin Page navigation.
wc_admin_update_0201_order_status_index() Update order stats `status` index length.
wc_admin_update_0201_db_version() Update DB Version.
wc_admin_update_0230_rename_gross_total() Rename "gross_total" to "total_sales".
wc_admin_update_0230_db_version() Update DB Version.
wc_admin_update_0251_remove_unsnooze_action() Remove the note unsnoozing scheduled action.
wc_admin_update_0251_db_version() Update DB Version.
wc_admin_update_110_remove_facebook_note() Remove Facebook Extension note.
wc_admin_update_110_db_version() Update DB Version.
wc_admin_update_130_remove_dismiss_action_from_tracking_opt_in_note() Remove Dismiss action from tracking opt-in admin note.
wc_admin_update_130_db_version() Update DB Version.
should_display_compatibility_notices() Whether notices must be displayed in the current page (plugins and WooCommerce pages).
woocommerce_blocks_admin_unsupported_wp_notice() Outputs for an admin notice about running WooCommerce Blocks on outdated WordPress.
woocommerce_blocks_get_i18n_data_json() Pre-filters script translations for the given file, script handle and text domain.
woocommerce_blocks_get_php_translation_from_core() Filter translations so we can retrieve translations from Core when the original and the translated texts are the same (which happens when translations are missing).
WC() Returns the main instance of WC.

Functions

wc_importer_current_locale()

Importer current locale.

wc_importer_current_locale( ) : string
Tags
since
Return values
string

wc_importer_default_english_mappings()

Add English mapping placeholders when not using English as current language.

wc_importer_default_english_mappings( $mappings : array ) : array
Parameters
$mappings : array

Importer columns mappings.

Tags
since
Return values
array

wc_importer_default_special_english_mappings()

Add English special mapping placeholders when not using English as current language.

wc_importer_default_special_english_mappings( $mappings : array ) : array
Parameters
$mappings : array

Importer columns mappings.

Tags
since
Return values
array

wc_importer_generic_mappings()

Add generic mappings.

wc_importer_generic_mappings( $mappings : array ) : array
Parameters
$mappings : array

Importer columns mappings.

Tags
since
Return values
array

wc_importer_shopify_mappings()

Add Shopify mappings.

wc_importer_shopify_mappings( $mappings : array , $raw_headers : array ) : array
Parameters
$mappings : array

Importer columns mappings.

$raw_headers : array

Raw headers from CSV being imported.

Tags
since
Return values
array

wc_importer_shopify_special_mappings()

Add special wildcard Shopify mappings.

wc_importer_shopify_special_mappings( $mappings : array , $raw_headers : array ) : array
Parameters
$mappings : array

Importer columns mappings.

$raw_headers : array

Raw headers from CSV being imported.

Tags
since
Return values
array

wc_importer_shopify_expand_data()

Expand special Shopify columns to WC format.

wc_importer_shopify_expand_data( $data : array ) : array
Parameters
$data : array

Array of data.

Tags
since
Return values
array

Expanded data.

wc_importer_wordpress_mappings()

Add mappings for WordPress tables.

wc_importer_wordpress_mappings( $mappings : array ) : array
Parameters
$mappings : array

Importer columns mappings.

Tags
since
Return values
array

wc_get_screen_ids()

Get all WooCommerce screen ids.

wc_get_screen_ids( ) : array
Return values
array

wc_create_page()

Create a page and store the ID in an option.

wc_create_page( $slug : mixed [, $option : string = '' ] [, $page_title : string = '' ] [, $page_content : string = '' ] , $post_parent : int ) : int
Parameters
$slug : mixed

Slug for the new page.

$option : string = ''

Option name to store the page's ID.

$page_title : string = ''

(default: '') Title for the new page.

$page_content : string = ''

(default: '') Content for the new page.

$post_parent : int

(default: 0) Parent for the new page.

Return values
int

page ID.

woocommerce_admin_fields()

Output admin fields.

woocommerce_admin_fields( $options : array ) : mixed

Loops through the woocommerce options array and outputs each field.

Parameters
$options : array

Opens array to output.

Return values
mixed

woocommerce_update_options()

Update all settings which are passed.

woocommerce_update_options( $options : array [, $data : array = null ] ) : mixed
Parameters
$options : array

Option fields to save.

$data : array = null

Passed data.

Return values
mixed

woocommerce_settings_get_option()

Get a setting from the settings API.

woocommerce_settings_get_option( $option_name : mixed [, $default : mixed = '' ] ) : string
Parameters
$option_name : mixed

Option name to save.

$default : mixed = ''

Default value to save.

Return values
string

wc_maybe_adjust_line_item_product_stock()

Sees if line item stock has already reduced stock, and whether those values need adjusting e.g. after changing item qty.

wc_maybe_adjust_line_item_product_stock( $item : WC_Order_Item [, $item_quantity : int = -1 ] ) : bool|array|WP_Error
Parameters
$item : WC_Order_Item

Item object.

$item_quantity : int = -1

Optional quantity to check against. Read from object if not passed.

Tags
since
Return values
bool|array|WP_Error

Array of changes or error object when stock is updated (@see wc_update_product_stock). False if nothing changes.

wc_save_order_items()

Save order items. Uses the CRUD.

wc_save_order_items( $order_id : int , $items : array ) : mixed
Parameters
$order_id : int

Order ID.

$items : array

Order items to save.

Tags
since
Return values
mixed

wc_render_action_buttons()

Get HTML for some action buttons. Used in list tables.

wc_render_action_buttons( $actions : array ) : string
Parameters
$actions : array

Actions to output.

Tags
since
Return values
string

wc_render_invalid_variation_notice()

Shows a notice if variations are missing prices.

wc_render_invalid_variation_notice( $product_object : WC_Product ) : mixed
Parameters
$product_object : WC_Product

Product object.

Tags
since
Return values
mixed

woocommerce_wp_text_input()

Output a text input box.

woocommerce_wp_text_input( $field : array ) : mixed
Parameters
$field : array
Return values
mixed

woocommerce_wp_hidden_input()

Output a hidden input box.

woocommerce_wp_hidden_input( $field : array ) : mixed
Parameters
$field : array
Return values
mixed

woocommerce_wp_textarea_input()

Output a textarea input box.

woocommerce_wp_textarea_input( $field : array ) : mixed
Parameters
$field : array
Return values
mixed

woocommerce_wp_checkbox()

Output a checkbox input box.

woocommerce_wp_checkbox( $field : array ) : mixed
Parameters
$field : array
Return values
mixed

woocommerce_wp_select()

Output a select input box.

woocommerce_wp_select( $field : array ) : mixed
Parameters
$field : array

Data about the field to render.

Return values
mixed

woocommerce_wp_radio()

Output a radio input box.

woocommerce_wp_radio( $field : array ) : mixed
Parameters
$field : array
Return values
mixed

wc_lostpassword_url()

Returns the url to the lost password endpoint url.

wc_lostpassword_url( [ $default_url : string = '' ] ) : string
Parameters
$default_url : string = ''

Default lost password URL.

Return values
string

wc_customer_edit_account_url()

Get the link to the edit account details page.

wc_customer_edit_account_url( ) : string
Return values
string

wc_edit_address_i18n()

Get the edit address slug translation.

wc_edit_address_i18n( $id : string [, $flip : bool = false ] ) : string
Parameters
$id : string

Address ID.

$flip : bool = false

Flip the array to make it possible to retrieve the values ​​from both sides.

Return values
string

Address slug i18n.

wc_get_account_menu_items()

Get My Account menu items.

wc_get_account_menu_items( ) : array
Tags
since
Return values
array

wc_get_account_menu_item_classes()

Get account menu item classes.

wc_get_account_menu_item_classes( $endpoint : string ) : string
Parameters
$endpoint : string

Endpoint.

Tags
since
Return values
string

wc_get_account_endpoint_url()

Get account endpoint URL.

wc_get_account_endpoint_url( $endpoint : string ) : string
Parameters
$endpoint : string

Endpoint.

Tags
since
Return values
string

wc_get_account_orders_columns()

Get My Account > Orders columns.

wc_get_account_orders_columns( ) : array
Tags
since
Return values
array

wc_get_account_downloads_columns()

Get My Account > Downloads columns.

wc_get_account_downloads_columns( ) : array
Tags
since
Return values
array

wc_get_account_payment_methods_columns()

Get My Account > Payment methods columns.

wc_get_account_payment_methods_columns( ) : array
Tags
since
Return values
array

wc_get_account_payment_methods_types()

Get My Account > Payment methods types

wc_get_account_payment_methods_types( ) : array
Tags
since
Return values
array

wc_get_account_orders_actions()

Get account orders actions.

wc_get_account_orders_actions( $order : int|WC_Order ) : array
Parameters
$order : int|WC_Order

Order instance or ID.

Tags
since
Return values
array

wc_get_account_formatted_address()

Get account formatted address.

wc_get_account_formatted_address( [ $address_type : string = 'billing' ] , $customer_id : int ) : string
Parameters
$address_type : string = 'billing'

Address type. Accepts: 'billing' or 'shipping'. Default to 'billing'.

$customer_id : int

Customer ID. Default to 0.

Tags
since
Return values
string

wc_get_account_saved_payment_methods_list()

Returns an array of a user's saved payments list for output on the account tab.

wc_get_account_saved_payment_methods_list( $list : array , $customer_id : int ) : array
Parameters
$list : array

List of payment methods passed from wc_get_customer_saved_methods_list().

$customer_id : int

The customer to fetch payment methods for.

Tags
since
Return values
array

Filtered list of customers payment methods.

wc_get_account_saved_payment_methods_list_item_cc()

Controls the output for credit cards on the my account page.

wc_get_account_saved_payment_methods_list_item_cc( $item : array , $payment_token : WC_Payment_Token ) : array
Parameters
$item : array

Individual list item from woocommerce_saved_payment_methods_list.

$payment_token : WC_Payment_Token

The payment token associated with this method entry.

Tags
since
Return values
array

Filtered item.

wc_get_account_saved_payment_methods_list_item_echeck()

Controls the output for eChecks on the my account page.

wc_get_account_saved_payment_methods_list_item_echeck( $item : array , $payment_token : WC_Payment_Token ) : array
Parameters
$item : array

Individual list item from woocommerce_saved_payment_methods_list.

$payment_token : WC_Payment_Token

The payment token associated with this method entry.

Tags
since
Return values
array

Filtered item.

wc_get_text_attributes()

Gets text attributes from a string.

wc_get_text_attributes( $raw_attributes : string ) : array
Parameters
$raw_attributes : string

Raw attributes.

Tags
since
Return values
array

wc_get_text_attributes_filter_callback()

See if an attribute is actually valid.

wc_get_text_attributes_filter_callback( $value : string ) : bool
Parameters
$value : string

Value.

Tags
since
Return values
bool

wc_implode_text_attributes()

Implode an array of attributes using WC_DELIMITER.

wc_implode_text_attributes( $attributes : array ) : string
Parameters
$attributes : array

Attributes list.

Tags
since
Return values
string

wc_get_attribute_taxonomies()

Get attribute taxonomies.

wc_get_attribute_taxonomies( ) : array
Return values
array

of objects, @since 3.6.0 these are also indexed by ID.

wc_get_attribute_taxonomy_ids()

Get (cached) attribute taxonomy ID and name pairs.

wc_get_attribute_taxonomy_ids( ) : array
Tags
since
Return values
array

wc_get_attribute_taxonomy_labels()

Get (cached) attribute taxonomy label and name pairs.

wc_get_attribute_taxonomy_labels( ) : array
Tags
since
Return values
array

wc_attribute_taxonomy_name()

Get a product attribute name.

wc_attribute_taxonomy_name( $attribute_name : string ) : string
Parameters
$attribute_name : string

Attribute name.

Return values
string

wc_variation_attribute_name()

Get the attribute name used when storing values in post meta.

wc_variation_attribute_name( $attribute_name : string ) : string
Parameters
$attribute_name : string

Attribute name.

Tags
since
Return values
string

wc_attribute_taxonomy_name_by_id()

Get a product attribute name by ID.

wc_attribute_taxonomy_name_by_id( $attribute_id : int ) : string
Parameters
$attribute_id : int

Attribute ID.

Tags
since
Return values
string

Return an empty string if attribute doesn't exist.

wc_attribute_taxonomy_id_by_name()

Get a product attribute ID by name.

wc_attribute_taxonomy_id_by_name( $name : string ) : int
Parameters
$name : string

Attribute name.

Tags
since
Return values
int

wc_attribute_label()

Get a product attributes label.

wc_attribute_label( $name : string [, $product : WC_Product = '' ] ) : string
Parameters
$name : string

Attribute name.

$product : WC_Product = ''

Product data.

Return values
string

wc_attribute_orderby()

Get a product attributes orderby setting.

wc_attribute_orderby( $name : string ) : string
Parameters
$name : string

Attribute name.

Return values
string

wc_get_attribute_taxonomy_names()

Get an array of product attribute taxonomies.

wc_get_attribute_taxonomy_names( ) : array
Return values
array

wc_get_attribute_types()

Get attribute types.

wc_get_attribute_types( ) : array
Tags
since
Return values
array

wc_has_custom_attribute_types()

Check if there are custom attribute types.

wc_has_custom_attribute_types( ) : bool
Tags
since
Return values
bool

True if there are custom types, otherwise false.

wc_get_attribute_type_label()

Get attribute type label.

wc_get_attribute_type_label( $type : string ) : string
Parameters
$type : string

Attribute type slug.

Tags
since
Return values
string

wc_is_attribute_in_product_name()

Check if an attribute is included in the attributes area of a variation name.

wc_is_attribute_in_product_name( $attribute : string , $name : string ) : bool
Parameters
$attribute : string

Attribute value to check for.

$name : string

Product name to check in.

Tags
since
Return values
bool

wc_array_filter_default_attributes()

Callback for array filter to get default attributes. Will allow for '0' string values, but regard all other class PHP FALSE equivalents normally.

wc_array_filter_default_attributes( $attribute : mixed ) : bool
Parameters
$attribute : mixed

Attribute being considered for exclusion from parent array.

Tags
since
Return values
bool

wc_get_attribute()

Get attribute data by ID.

wc_get_attribute( $id : int ) : stdClass|null
Parameters
$id : int

Attribute ID.

Tags
since
Return values
stdClass|null

wc_create_attribute()

Create attribute.

wc_create_attribute( $args : array ) : int|WP_Error
Parameters
$args : array

Attribute arguments { Array of attribute parameters.

@type int    $id           Unique identifier, used to update an attribute.
@type string $name         Attribute name. Always required.
@type string $slug         Attribute alphanumeric identifier.
@type string $type         Type of attribute.
                           Core by default accepts: 'select' and 'text'.
                           Default to 'select'.
@type string $order_by     Sort order.
                           Accepts: 'menu_order', 'name', 'name_num' and 'id'.
                           Default to 'menu_order'.
@type bool   $has_archives Enable or disable attribute archives. False by default.

}

Tags
since
Return values
int|WP_Error

wc_update_attribute()

Update an attribute.

wc_update_attribute( $id : int , $args : array ) : int|WP_Error

For available args see wc_create_attribute().

Parameters
$id : int

Attribute ID.

$args : array

Attribute arguments.

Tags
since
Return values
int|WP_Error

wc_delete_attribute()

Delete attribute by ID.

wc_delete_attribute( $id : int ) : bool
Parameters
$id : int

Attribute ID.

Tags
since
Return values
bool

wc_attribute_taxonomy_slug()

Get an unprefixed product attribute name.

wc_attribute_taxonomy_slug( $attribute_name : string ) : string
Parameters
$attribute_name : string

Attribute name.

Tags
since
Return values
string

wc_protected_product_add_to_cart()

Prevent password protected products being added to the cart.

wc_protected_product_add_to_cart( $passed : bool , $product_id : int ) : bool
Parameters
$passed : bool

Validation.

$product_id : int

Product ID.

Return values
bool

wc_empty_cart()

Clears the cart session when called.

wc_empty_cart( ) : mixed
Return values
mixed

wc_load_persistent_cart()

Load the persistent cart.

wc_load_persistent_cart( $user_login : string , $user : WP_User ) : mixed
Parameters
$user_login : string

User login.

$user : WP_User

User data.

Tags
deprecated
Return values
mixed

wc_get_raw_referer()

Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.

wc_get_raw_referer( ) : string|false

Do not use for redirects, use \wp_get_referer() instead.

Tags
since
Return values
string|false

Referer URL on success, false on failure.

wc_add_to_cart_message()

Add to cart messages.

wc_add_to_cart_message( $products : int|array [, $show_qty : bool = false ] [, $return : bool = false ] ) : mixed
Parameters
$products : int|array

Product ID list or single product ID.

$show_qty : bool = false

Should qty's be shown? Added in 2.6.0.

$return : bool = false

Return message rather than add it.

Return values
mixed

wc_format_list_of_items()

Comma separate a list of item names, and replace final comma with 'and'.

wc_format_list_of_items( $items : array ) : string
Parameters
$items : array

Cart items.

Return values
string

wc_clear_cart_after_payment()

Clear cart after payment.

wc_clear_cart_after_payment( ) : mixed
Return values
mixed

wc_cart_totals_subtotal_html()

Get the subtotal.

wc_cart_totals_subtotal_html( ) : mixed
Return values
mixed

wc_cart_totals_shipping_html()

Get shipping methods.

wc_cart_totals_shipping_html( ) : mixed
Return values
mixed

wc_cart_totals_taxes_total_html()

Get taxes total.

wc_cart_totals_taxes_total_html( ) : mixed
Return values
mixed

wc_cart_totals_coupon_label()

Get a coupon label.

wc_cart_totals_coupon_label( $coupon : string|WC_Coupon [, $echo : bool = true ] ) : string
Parameters
$coupon : string|WC_Coupon

Coupon data or code.

$echo : bool = true

Echo or return.

Return values
string

wc_cart_totals_coupon_html()

Get coupon display HTML.

wc_cart_totals_coupon_html( $coupon : string|WC_Coupon ) : mixed
Parameters
$coupon : string|WC_Coupon

Coupon data or code.

Return values
mixed

wc_cart_totals_order_total_html()

Get order total html including inc tax if needed.

wc_cart_totals_order_total_html( ) : mixed
Return values
mixed

wc_cart_totals_fee_html()

Get the fee value.

wc_cart_totals_fee_html( $fee : object ) : mixed
Parameters
$fee : object

Fee data.

Return values
mixed

wc_cart_totals_shipping_method_label()

Get a shipping methods full label including price.

wc_cart_totals_shipping_method_label( $method : WC_Shipping_Rate ) : string
Parameters
$method : WC_Shipping_Rate

Shipping method rate data.

Return values
string

wc_cart_round_discount()

Round discount.

wc_cart_round_discount( $value : float , $precision : int ) : float
Parameters
$value : float

Amount to round.

$precision : int

DP to round.

Return values
float

wc_get_chosen_shipping_method_ids()

Gets chosen shipping method IDs from chosen_shipping_methods session, without instance IDs.

wc_get_chosen_shipping_method_ids( ) : string[]
Tags
since
Return values
string[]

wc_get_chosen_shipping_method_for_package()

Get chosen method for package from session.

wc_get_chosen_shipping_method_for_package( $key : int , $package : array ) : string|bool
Parameters
$key : int

Key of package.

$package : array

Package data array.

Tags
since
Return values
string|bool

wc_get_default_shipping_method_for_package()

Choose the default method for a package.

wc_get_default_shipping_method_for_package( $key : int , $package : array , $chosen_method : string ) : string
Parameters
$key : int

Key of package.

$package : array

Package data array.

$chosen_method : string

Chosen method id.

Tags
since
Return values
string

wc_shipping_methods_have_changed()

See if the methods have changed since the last request.

wc_shipping_methods_have_changed( $key : int , $package : array ) : bool
Parameters
$key : int

Key of package.

$package : array

Package data array.

Tags
since
Return values
bool

wc_get_cart_item_data_hash()

Gets a hash of important product data that when changed should cause cart items to be invalidated.

wc_get_cart_item_data_hash( $product : WC_Product ) : string

The woocommerce_cart_item_data_to_validate filter can be used to add custom properties.

Parameters
$product : WC_Product

Product object.

Return values
string

is_woocommerce()

Is_woocommerce - Returns true if on a page which uses WooCommerce templates (cart and checkout are standard pages with shortcodes and thus are not included).

is_woocommerce( ) : bool
Return values
bool

is_shop()

Is_shop - Returns true when viewing the product type archive (shop).

is_shop( ) : bool
Return values
bool

is_product_taxonomy()

Is_product_taxonomy - Returns true when viewing a product taxonomy archive.

is_product_taxonomy( ) : bool
Return values
bool

is_product_category()

Is_product_category - Returns true when viewing a product category.

is_product_category( [ $term : string = '' ] ) : bool
Parameters
$term : string = ''

(default: '') The term slug your checking for. Leave blank to return true on any.

Return values
bool

is_product_tag()

Is_product_tag - Returns true when viewing a product tag.

is_product_tag( [ $term : string = '' ] ) : bool
Parameters
$term : string = ''

(default: '') The term slug your checking for. Leave blank to return true on any.

Return values
bool

is_product()

Is_product - Returns true when viewing a single product.

is_product( ) : bool
Return values
bool

is_checkout()

Is_checkout - Returns true when viewing the checkout page.

is_checkout( ) : bool
Return values
bool

is_checkout_pay_page()

Is_checkout_pay - Returns true when viewing the checkout's pay page.

is_checkout_pay_page( ) : bool
Return values
bool

is_wc_endpoint_url()

Is_wc_endpoint_url - Check if an endpoint is showing.

is_wc_endpoint_url( [ $endpoint : string|false = false ] ) : bool
Parameters
$endpoint : string|false = false

Whether endpoint.

Return values
bool

is_account_page()

Is_account_page - Returns true when viewing an account page.

is_account_page( ) : bool
Return values
bool

is_view_order_page()

Is_view_order_page - Returns true when on the view order page.

is_view_order_page( ) : bool
Return values
bool

is_edit_account_page()

Check for edit account page.

is_edit_account_page( ) : bool

Returns true when viewing the edit account page.

Tags
since
Return values
bool

is_order_received_page()

Is_order_received_page - Returns true when viewing the order received page.

is_order_received_page( ) : bool
Return values
bool

is_add_payment_method_page()

Is_add_payment_method_page - Returns true when viewing the add payment method page.

is_add_payment_method_page( ) : bool
Return values
bool

is_lost_password_page()

Is_lost_password_page - Returns true when viewing the lost password page.

is_lost_password_page( ) : bool
Return values
bool

is_ajax()

Is_ajax - Returns true when the page is loaded via ajax.

is_ajax( ) : bool
Return values
bool

is_store_notice_showing()

Is_store_notice_showing - Returns true when store notice is active.

is_store_notice_showing( ) : bool
Return values
bool

is_filtered()

Is_filtered - Returns true when filtering products using layered nav or price sliders.

is_filtered( ) : bool
Return values
bool

taxonomy_is_product_attribute()

Returns true when the passed taxonomy name is a product attribute.

taxonomy_is_product_attribute( $name : string ) : bool
Parameters
$name : string

of the attribute.

Tags
uses

$wc_product_attributes global which stores taxonomy names upon registration

Return values
bool

meta_is_product_attribute()

Returns true when the passed meta name is a product attribute.

meta_is_product_attribute( $name : string , $value : string , $product_id : int ) : bool
Parameters
$name : string

of the attribute.

$value : string

of the attribute.

$product_id : int

to check for attribute.

Return values
bool

wc_prices_include_tax()

Are prices inclusive of tax?

wc_prices_include_tax( ) : bool
Return values
bool

wc_is_valid_url()

Simple check for validating a URL, it must start with http:// or https://.

wc_is_valid_url( $url : string ) : bool

and pass FILTER_VALIDATE_URL validation.

Parameters
$url : string

to check.

Return values
bool

wc_site_is_https()

Check if the home URL is https. If it is, we don't need to do things such as 'force ssl'.

wc_site_is_https( ) : bool
Tags
since
Return values
bool

wc_checkout_is_https()

Check if the checkout is configured for https. Look at options, WP HTTPS plugin, or the permalink itself.

wc_checkout_is_https( ) : bool
Tags
since
Return values
bool

wc_post_content_has_shortcode()

Checks whether the content passed contains a specific short code.

wc_post_content_has_shortcode( [ $tag : string = '' ] ) : bool
Parameters
$tag : string = ''

Shortcode tag to check.

Return values
bool

wc_reviews_enabled()

Check if reviews are enabled.

wc_reviews_enabled( ) : bool
Tags
since
Return values
bool

wc_review_ratings_enabled()

Check if reviews ratings are enabled.

wc_review_ratings_enabled( ) : bool
Tags
since
Return values
bool

wc_review_ratings_required()

Check if review ratings are required.

wc_review_ratings_required( ) : bool
Tags
since
Return values
bool

wc_is_file_valid_csv()

Check if a CSV file is valid.

wc_is_file_valid_csv( $file : string [, $check_path : bool = true ] ) : bool
Parameters
$file : string

File name.

$check_path : bool = true

If should check for the path.

Tags
since
Return values
bool

wc_maybe_define_constant()

Define a constant if it is not already defined.

wc_maybe_define_constant( $name : string , $value : mixed ) : mixed
Parameters
$name : string

Constant name.

$value : mixed

Value.

Tags
since
Return values
mixed

wc_create_order()

Create a new order programmatically.

wc_create_order( [ $args : array = array() ] ) : WC_Order|WP_Error

Returns a new order object on success which can then be used to add additional data.

Parameters
$args : array = array()

Order arguments.

Return values
WC_Order|WP_Error

wc_update_order()

Update an order. Uses wc_create_order.

wc_update_order( $args : array ) : WC_Order|WP_Error
Parameters
$args : array

Order arguments.

Return values
WC_Order|WP_Error

wc_tokenize_path()

Given a path, this will convert any of the subpaths into their corresponding tokens.

wc_tokenize_path( $path : string , $path_tokens : array ) : string
Parameters
$path : string

The absolute path to tokenize.

$path_tokens : array

An array keyed with the token, containing paths that should be replaced.

Tags
since
Return values
string

The tokenized path.

wc_untokenize_path()

Given a tokenized path, this will expand the tokens to their full path.

wc_untokenize_path( $path : string , $path_tokens : array ) : string
Parameters
$path : string

The absolute path to expand.

$path_tokens : array

An array keyed with the token, containing paths that should be expanded.

Tags
since
Return values
string

The absolute path.

wc_get_path_define_tokens()

Fetches an array containing all of the configurable path constants to be used in tokenization.

wc_get_path_define_tokens( ) : array
Return values
array

The key is the define and the path is the constant.

wc_get_template_part()

Get template part (for templates like the shop-loop).

wc_get_template_part( $slug : mixed [, $name : string = '' ] ) : mixed

WC_TEMPLATE_DEBUG_MODE will prevent overrides in themes from taking priority.

Parameters
$slug : mixed

Template slug.

$name : string = ''

Template name (default: '').

Return values
mixed

wc_get_template()

Get other templates (e.g. product attributes) passing attributes and including the file.

wc_get_template( $template_name : string [, $args : array = array() ] [, $template_path : string = '' ] [, $default_path : string = '' ] ) : mixed
Parameters
$template_name : string

Template name.

$args : array = array()

Arguments. (default: array).

$template_path : string = ''

Template path. (default: '').

$default_path : string = ''

Default path. (default: '').

Return values
mixed

wc_get_template_html()

Like wc_get_template, but returns the HTML instead of outputting.

wc_get_template_html( $template_name : string [, $args : array = array() ] [, $template_path : string = '' ] [, $default_path : string = '' ] ) : string
Parameters
$template_name : string

Template name.

$args : array = array()

Arguments. (default: array).

$template_path : string = ''

Template path. (default: '').

$default_path : string = ''

Default path. (default: '').

Tags
see
since
Return values
string

wc_locate_template()

Locate a template and return the path for inclusion.

wc_locate_template( $template_name : string [, $template_path : string = '' ] [, $default_path : string = '' ] ) : string

This is the load order:

yourtheme/$template_path/$template_name yourtheme/$template_name $default_path/$template_name

Parameters
$template_name : string

Template name.

$template_path : string = ''

Template path. (default: '').

$default_path : string = ''

Default path. (default: '').

Return values
string

wc_set_template_cache()

Add a template to the template cache.

wc_set_template_cache( $cache_key : string , $template : string ) : mixed
Parameters
$cache_key : string

Object cache key.

$template : string

Located template.

Tags
since
Return values
mixed

wc_clear_template_cache()

Clear the template cache.

wc_clear_template_cache( ) : mixed
Tags
since
Return values
mixed

get_woocommerce_currency()

Get Base Currency Code.

get_woocommerce_currency( ) : string
Return values
string

get_woocommerce_currency_symbol()

Get Currency symbol.

get_woocommerce_currency_symbol( [ $currency : string = '' ] ) : string

Currency symbols and names should follow the Unicode CLDR recommendation (http://cldr.unicode.org/translation/currency-names)

Parameters
$currency : string = ''

Currency. (default: '').

Return values
string

wc_mail()

Send HTML emails from WooCommerce.

wc_mail( $to : mixed , $subject : mixed , $message : mixed [, $headers : string = "Content-Type: text/html\r\n" ] [, $attachments : string = '' ] ) : bool
Parameters
$to : mixed

Receiver.

$subject : mixed

Subject.

$message : mixed

Message.

$headers : string = "Content-Type: text/html\r\n"

Headers. (default: "Content-Type: text/html\r\n").

$attachments : string = ''

Attachments. (default: "").

Return values
bool

wc_get_theme_support()

Return "theme support" values from the current theme, if set.

wc_get_theme_support( [ $prop : string = '' ] [, $default : mixed = null ] ) : mixed
Parameters
$prop : string = ''

Name of prop (or key::subkey for arrays of props) if you want a specific value. Leave blank to get all props as an array.

$default : mixed = null

Optional value to return if the theme does not declare support for a prop.

Tags
since
Return values
mixed

Value of prop(s).

wc_get_image_size()

Get an image size by name or defined dimensions.

wc_get_image_size( $image_size : array|string ) : array

The returned variable is filtered by woocommerce_get_imagesize{image_size} filter to allow 3rd party customisation.

Sizes defined by the theme take priority over settings. Settings are hidden when a theme defines sizes.

Parameters
$image_size : array|string

Name of the image size to get, or an array of dimensions.

Return values
array

Array of dimensions including width, height, and cropping mode. Cropping mode is 0 for no crop, and 1 for hard crop.

wc_enqueue_js()

Queue some JavaScript code to be output in the footer.

wc_enqueue_js( $code : string ) : mixed
Parameters
$code : string

Code.

Return values
mixed

wc_print_js()

Output any queued javascript code in the footer.

wc_print_js( ) : mixed
Return values
mixed

wc_setcookie()

Set a cookie - wrapper for setcookie using WP constants.

wc_setcookie( $name : string , $value : string , $expire : int [, $secure : bool = false ] [, $httponly : bool = false ] ) : mixed
Parameters
$name : string

Name of the cookie being set.

$value : string

Value of the cookie.

$expire : int

Expiry of the cookie.

$secure : bool = false

Whether the cookie should be served only over https.

$httponly : bool = false

Whether the cookie is only accessible over HTTP, not scripting languages like JavaScript. @since 3.6.0.

Return values
mixed

get_woocommerce_api_url()

Get the URL to the WooCommerce REST API.

get_woocommerce_api_url( $path : string ) : string
Parameters
$path : string

an endpoint to include in the URL.

Tags
since
Return values
string

the URL.

wc_get_log_file_path()

Get a log file path.

wc_get_log_file_path( $handle : string ) : string
Parameters
$handle : string

name.

Tags
since
Return values
string

the log file path.

wc_get_log_file_name()

Get a log file name.

wc_get_log_file_name( $handle : string ) : string
Parameters
$handle : string

Name.

Tags
since
Return values
string

The log file name.

wc_get_page_children()

Recursively get page children.

wc_get_page_children( $page_id : int ) : int[]
Parameters
$page_id : int

Page ID.

Return values
int[]

flush_rewrite_rules_on_shop_page_save()

Flushes rewrite rules when the shop page (or it's children) gets saved.

flush_rewrite_rules_on_shop_page_save( ) : mixed
Return values
mixed

wc_fix_rewrite_rules()

Various rewrite rule fixes.

wc_fix_rewrite_rules( $rules : array ) : array
Parameters
$rules : array

Rules.

Tags
since
Return values
array

wc_fix_product_attachment_link()

Prevent product attachment links from breaking when using complex rewrite structures.

wc_fix_product_attachment_link( $link : string , $post_id : int ) : string
Parameters
$link : string

Link.

$post_id : int

Post ID.

Return values
string

wc_ms_protect_download_rewite_rules()

Protect downloads from ms-files.php in multisite.

wc_ms_protect_download_rewite_rules( $rewrite : string ) : string
Parameters
$rewrite : string

rewrite rules.

Return values
string

wc_format_country_state_string()

Formats a string in the format COUNTRY:STATE into an array.

wc_format_country_state_string( $country_string : string ) : array
Parameters
$country_string : string

Country string.

Tags
since
Return values
array

wc_get_base_location()

Get the store's base location.

wc_get_base_location( ) : array
Tags
since
Return values
array

wc_get_customer_default_location()

Get the customer's default location.

wc_get_customer_default_location( ) : array

Filtered, and set to base location or left blank. If cache-busting, this should only be used when 'location' is set in the querystring.

Tags
since
Return values
array

wc_get_user_agent()

Get user agent string.

wc_get_user_agent( ) : string
Tags
since
Return values
string

wc_rand_hash()

Generate a rand hash.

wc_rand_hash( ) : string
Tags
since
Return values
string

wc_api_hash()

WC API - Hash.

wc_api_hash( $data : string ) : string
Parameters
$data : string

Message to be hashed.

Tags
since
Return values
string

wc_array_cartesian()

Find all possible combinations of values from the input array and return in a logical order.

wc_array_cartesian( $input : array ) : array
Parameters
$input : array

Input.

Tags
since
Return values
array

wc_transaction_query()

Run a MySQL transaction query, if supported.

wc_transaction_query( [ $type : string = 'start' ] [, $force : bool = false ] ) : mixed
Parameters
$type : string = 'start'

Types: start (default), commit, rollback.

$force : bool = false

use of transactions.

Tags
since
Return values
mixed

wc_get_cart_url()

Gets the url to the cart page.

wc_get_cart_url( ) : string
Tags
since
Return values
string

Url to cart page

wc_get_checkout_url()

Gets the url to the checkout page.

wc_get_checkout_url( ) : string
Tags
since
Return values
string

Url to checkout page

woocommerce_register_shipping_method()

Register a shipping method.

woocommerce_register_shipping_method( $shipping_method : string|object ) : mixed
Parameters
$shipping_method : string|object

class name (string) or a class object.

Tags
since
Return values
mixed

wc_get_shipping_zone()

Get the shipping zone matching a given package from the cart.

wc_get_shipping_zone( $package : array ) : WC_Shipping_Zone
Parameters
$package : array

Shipping package.

Tags
since
uses
Return values
WC_Shipping_Zone

wc_get_credit_card_type_label()

Get a nice name for credit card providers.

wc_get_credit_card_type_label( $type : string ) : string
Parameters
$type : string

Provider Slug/Type.

Tags
since
Return values
string

wc_back_link()

Outputs a "back" link so admin screens can easily jump back a page.

wc_back_link( $label : string , $url : string ) : mixed
Parameters
$label : string

Title of the page to return to.

$url : string

URL of the page to return to.

Return values
mixed

wc_help_tip()

Display a WooCommerce help tip.

wc_help_tip( $tip : string [, $allow_html : bool = false ] ) : string
Parameters
$tip : string

Help tip text.

$allow_html : bool = false

Allow sanitized HTML if true or escape.

Tags
since
Return values
string

wc_get_wildcard_postcodes()

Return a list of potential postcodes for wildcard searching.

wc_get_wildcard_postcodes( $postcode : string [, $country : string = '' ] ) : string[]
Parameters
$postcode : string

Postcode.

$country : string = ''

Country to format postcode for matching.

Tags
since
Return values
string[]

wc_postcode_location_matcher()

Used by shipping zones and taxes to compare a given $postcode to stored postcodes to find matches for numerical ranges, and wildcards.

wc_postcode_location_matcher( $postcode : string , $objects : array , $object_id_key : string , $object_compare_key : string [, $country : string = '' ] ) : array
Parameters
$postcode : string

Postcode you want to match against stored postcodes.

$objects : array

Array of postcode objects from Database.

$object_id_key : string

DB column name for the ID.

$object_compare_key : string

DB column name for the value.

$country : string = ''

Country from which this postcode belongs. Allows for formatting.

Tags
since
Return values
array

Array of matching object ID and matching values.

wc_get_shipping_method_count()

Gets number of shipping methods currently enabled. Used to identify if shipping is configured.

wc_get_shipping_method_count( [ $include_legacy : bool = false ] [, $enabled_only : bool = false ] ) : int
Parameters
$include_legacy : bool = false

Count legacy shipping methods too.

$enabled_only : bool = false

Whether non-legacy shipping methods should be restricted to enabled ones. It doesn't affect legacy shipping methods. @since 4.3.0.

Tags
since
Return values
int

wc_set_time_limit()

Wrapper for set_time_limit to see if it is enabled.

wc_set_time_limit( $limit : int ) : mixed
Parameters
$limit : int

Time limit.

Tags
since
Return values
mixed

wc_nocache_headers()

Wrapper for nocache_headers which also disables page caching.

wc_nocache_headers( ) : mixed
Tags
since
Return values
mixed

wc_product_attribute_uasort_comparison()

Used to sort products attributes with uasort.

wc_product_attribute_uasort_comparison( $a : array , $b : array ) : int
Parameters
$a : array

First attribute to compare.

$b : array

Second attribute to compare.

Tags
since
Return values
int

wc_shipping_zone_method_order_uasort_comparison()

Used to sort shipping zone methods with uasort.

wc_shipping_zone_method_order_uasort_comparison( $a : array , $b : array ) : int
Parameters
$a : array

First shipping zone method to compare.

$b : array

Second shipping zone method to compare.

Tags
since
Return values
int

wc_checkout_fields_uasort_comparison()

User to sort checkout fields based on priority with uasort.

wc_checkout_fields_uasort_comparison( $a : array , $b : array ) : int
Parameters
$a : array

First field to compare.

$b : array

Second field to compare.

Tags
since
Return values
int

wc_uasort_comparison()

User to sort two values with ausort.

wc_uasort_comparison( $a : int , $b : int ) : int
Parameters
$a : int

First value to compare.

$b : int

Second value to compare.

Tags
since
Return values
int

wc_ascii_uasort_comparison()

Sort values based on ascii, usefull for special chars in strings.

wc_ascii_uasort_comparison( $a : string , $b : string ) : int
Parameters
$a : string

First value.

$b : string

Second value.

Return values
int

wc_get_tax_rounding_mode()

Get rounding mode for internal tax calculations.

wc_get_tax_rounding_mode( ) : int
Tags
since
Return values
int

wc_get_rounding_precision()

Get rounding precision for internal WC calculations.

wc_get_rounding_precision( ) : int

Will increase the precision of wc_get_price_decimals by 2 decimals, unless WC_ROUNDING_PRECISION is set to a higher number.

Tags
since
Return values
int

wc_add_number_precision()

Add precision to a number and return a number.

wc_add_number_precision( $value : float [, $round : bool = true ] ) : int|float
Parameters
$value : float

Number to add precision to.

$round : bool = true

If should round after adding precision.

Tags
since
Return values
int|float

wc_remove_number_precision()

Remove precision from a number and return a float.

wc_remove_number_precision( $value : float ) : float
Parameters
$value : float

Number to add precision to.

Tags
since
Return values
float

wc_add_number_precision_deep()

Add precision to an array of number and return an array of int.

wc_add_number_precision_deep( $value : array [, $round : bool = true ] ) : int|array
Parameters
$value : array

Number to add precision to.

$round : bool = true

Should we round after adding precision?.

Tags
since
Return values
int|array

wc_remove_number_precision_deep()

Remove precision from an array of number and return an array of int.

wc_remove_number_precision_deep( $value : array ) : int|array
Parameters
$value : array

Number to add precision to.

Tags
since
Return values
int|array

wc_get_logger()

Get a shared logger instance.

wc_get_logger( ) : WC_Logger

Use the woocommerce_logging_class filter to change the logging class. You may provide one of the following:

  • a class name which will be instantiated as new $class with no arguments
  • an instance which will be used directly as the logger In either case, the class or instance must implement WC_Logger_Interface.
Tags
see
Return values
WC_Logger

wc_cleanup_logs()

Trigger logging cleanup using the logging class.

wc_cleanup_logs( ) : mixed
Tags
since
Return values
mixed

wc_print_r()

Prints human-readable information about a variable.

wc_print_r( $expression : mixed [, $return : bool = false ] ) : string|bool

Some server environments blacklist some debugging functions. This function provides a safe way to turn an expression into a printable, readable form without calling blacklisted functions.

Parameters
$expression : mixed

The expression to be printed.

$return : bool = false

Optional. Default false. Set to true to return the human-readable string.

Tags
since
Return values
string|bool

False if expression could not be printed. True if the expression was printed. If $return is true, a string representation will be returned.

wc_register_default_log_handler()

Registers the default log handler.

wc_register_default_log_handler( $handlers : array ) : array
Parameters
$handlers : array

Handlers.

Tags
since
Return values
array

wc_list_pluck()

Based on wp_list_pluck, this calls a method instead of returning a property.

wc_list_pluck( $list : array , $callback_or_field : int|string [, $index_key : int|string = null ] ) : array
Parameters
$list : array

List of objects or arrays.

$callback_or_field : int|string

Callback method from the object to place instead of the entire object.

$index_key : int|string = null

Optional. Field from the object to use as keys for the new array. Default null.

Tags
since
Return values
array

Array of values.

wc_get_permalink_structure()

Get permalink settings for things like products and taxonomies.

wc_get_permalink_structure( ) : array

As of 3.3.0, the permalink settings are stored to the option instead of being blank and inheritting from the locale. This speeds up page loading times by negating the need to switch locales on each page load.

This is more inline with WP core behavior which does not localize slugs.

Tags
since
Return values
array

wc_switch_to_site_locale()

Switch WooCommerce to site language.

wc_switch_to_site_locale( ) : mixed
Tags
since
Return values
mixed

wc_restore_locale()

Switch WooCommerce language to original.

wc_restore_locale( ) : mixed
Tags
since
Return values
mixed

wc_get_post_data_by_key()

Get an item of post data if set, otherwise return a default value.

wc_get_post_data_by_key( $key : string [, $default : string = '' ] ) : mixed
Parameters
$key : string

Meta key.

$default : string = ''

Default value.

Tags
since
Return values
mixed

Value sanitized by wc_clean.

wc_get_var()

Get data if set, otherwise return a default value or null. Prevents notices when data is not set.

wc_get_var( &$var : mixed [, $default : string = null ] ) : mixed
Parameters
$var : mixed

Variable.

$default : string = null

Default value.

Tags
since
Return values
mixed

wc_enable_wc_plugin_headers()

Read in WooCommerce headers when reading plugin headers.

wc_enable_wc_plugin_headers( $headers : array ) : array
Parameters
$headers : array

Headers.

Tags
since
Return values
array

wc_prevent_dangerous_auto_updates()

Prevent auto-updating the WooCommerce plugin on major releases if there are untested extensions active.

wc_prevent_dangerous_auto_updates( $should_update : bool , $plugin : object ) : bool
Parameters
$should_update : bool

If should update.

$plugin : object

Plugin data.

Tags
since
Return values
bool

wc_delete_expired_transients()

Delete expired transients.

wc_delete_expired_transients( ) : int

Deletes all expired transients. The multi-table delete syntax is used. to delete the transient record from table a, and the corresponding. transient_timeout record from table b.

Based on code inside core's upgrade_network() function.

Tags
since
Return values
int

Number of transients that were cleared.

wc_get_relative_url()

Make a URL relative, if possible.

wc_get_relative_url( $url : string ) : string
Parameters
$url : string

URL to make relative.

Tags
since
Return values
string

wc_is_external_resource()

See if a resource is remote.

wc_is_external_resource( $url : string ) : bool
Parameters
$url : string

URL to check.

Tags
since
Return values
bool

wc_is_active_theme()

See if theme/s is activate or not.

wc_is_active_theme( $theme : string|array ) : bool
Parameters
$theme : string|array

Theme name or array of theme names to check.

Tags
since
Return values
bool

wc_is_wp_default_theme_active()

Is the site using a default WP theme?

wc_is_wp_default_theme_active( ) : bool
Return values
bool

wc_cleanup_session_data()

Cleans up session data - cron callback.

wc_cleanup_session_data( ) : mixed
Tags
since
Return values
mixed

wc_round_discount()

Round discount.

wc_round_discount( $value : float , $precision : int ) : float
Parameters
$value : float

Amount to round.

$precision : int

DP to round.

Return values
float

wc_selected()

Return the html selected attribute if stringified $value is found in array of stringified $options or if stringified $value is the same as scalar stringified $options.

wc_selected( $value : string|int , $options : string|int|array ) : string
Parameters
$value : string|int

Value to find within options.

$options : string|int|array

Options to go through when looking for value.

Return values
string

wc_get_server_database_version()

Retrieves the MySQL server version. Based on $wpdb.

wc_get_server_database_version( ) : array
Tags
since
Return values
array

Vesion information.

wc_load_cart()

Initialize and load the cart functionality.

wc_load_cart( ) : void
Tags
since

wc_is_running_from_async_action_scheduler()

Test whether the context of execution comes from async action scheduler.

wc_is_running_from_async_action_scheduler( ) : bool
Tags
since
Return values
bool

wc_get_coupon_types()

Get coupon types.

wc_get_coupon_types( ) : array
Return values
array

wc_get_coupon_type()

Get a coupon type's name.

wc_get_coupon_type( [ $type : string = '' ] ) : string
Parameters
$type : string = ''

Coupon type.

Return values
string

wc_get_product_coupon_types()

Coupon types that apply to individual products. Controls which validation rules will apply.

wc_get_product_coupon_types( ) : array
Tags
since
Return values
array

wc_get_cart_coupon_types()

Coupon types that apply to the cart as a whole. Controls which validation rules will apply.

wc_get_cart_coupon_types( ) : array
Tags
since
Return values
array

wc_coupons_enabled()

Check if coupons are enabled.

wc_coupons_enabled( ) : bool

Filterable.

Tags
since
Return values
bool

wc_get_coupon_code_by_id()

Get coupon code by ID.

wc_get_coupon_code_by_id( $id : int ) : string
Parameters
$id : int

Coupon ID.

Tags
since
Return values
string

wc_get_coupon_id_by_code()

Get coupon code by ID.

wc_get_coupon_id_by_code( $code : string , $exclude : int ) : int
Parameters
$code : string

Coupon code.

$exclude : int

Used to exclude an ID from the check if you're checking existence.

Tags
since