WooCommerce Code Reference

WooCommerce

Packages

Classes
Abstracts
Admin
Helper
Views
Templates
Reports
Blocks
RestApi
CLI
l10n
Webhooks
DataStores
Emails
Export
Gateways
PayPal
Import
Integrations
Interfaces
Interface
LogHandlers
PaymentTokens
Utilities
Shipping
Shortcodes
Tracks
Traits
Functions
WCCom
WCCOM
Widgets
Uninstaller

Interfaces, Classes and Traits

ArgumentResolverInterface
ClassNameInterface
RawArgumentInterface
ContainerAwareInterface
DefinitionAggregateInterface
DefinitionInterface
InflectorAggregateInterface
InflectorInterface
BootableServiceProviderInterface
ServiceProviderAggregateInterface
ServiceProviderInterface
ContainerExceptionInterface
Base interface representing a generic exception in a container.
ContainerInterface
Describes the interface of a container that exposes methods to read its entries.
NotFoundExceptionInterface
No entry was found in the container.
DataStoreInterface
WooCommerce Reports data store interface.
ExportableInterface
WooCommerce Reports exportable controller interface.
DateTimeProviderInterface
DateTime Provider Interface.
MarketingChannelInterface
MarketingChannelInterface interface
PluginsInstallLogger
A logger used in PluginsHelper::install_plugins to log the installation progress.
PluginsProviderInterface
Plugins Provider Interface
RuleProcessorInterface
Rule processor interface
CacheEngine
Interface for cache engines used by objects inheriting from ObjectCache.
WC_Notes_Refund_Returns
WC_Notes_Refund_Returns.
WC_Notes_Run_Db_Update
WC_Notes_Run_Db_Update.
WC_Meta_Data
Meta data class.
WooCommerce
Main WooCommerce Class.
WC_CLI_COM_Command
Allows to interact with extensions from WCCOM marketplace via CLI.
WC_CLI_COM_Extension_Command
Allows to interact with extensions from WCCOM marketplace via CLI.
WC_CLI_REST_Command
Main Command for WooCommerce 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_Tracker_Command
Allows access to tracker snapshot for transparency and debugging.
WC_CLI_Update_Command
Allows updates via CLI.
WC_Customizer_Control_Cropping
WC_Customizer_Control_Cropping class.
WC_Shop_Customizer
WC_Shop_Customizer class.
ClassName
ClassNameWithOptionalValue
RawArgument
Container
Definition
DefinitionAggregate
ContainerException
NotFoundException
Inflector
InflectorAggregate
ReflectionContainer
AbstractServiceProvider
ServiceProviderAggregate
Experiments
Data controller.
Options
Options Controller.
Cache
REST API Reports Cache class.
DataStore
API\Reports\Categories\DataStore.
Query
API\Reports\Query
DataStore
API\Reports\Coupons\DataStore.
Query
API\Reports\Coupons\Query
DataStore
API\Reports\Coupons\Stats\DataStore.
Query
API\Reports\Coupons\Stats\Query
Segmenter
Date & time interval and numeric range handling class for Reporting API.
DataStore
Admin\API\Reports\Customers\DataStore.
Query
API\Reports\Customers\Query
DataStore
API\Reports\Customers\Stats\DataStore.
Query
API\Reports\Customers\Stats\Query
DataStore
Admin\API\Reports\DataStore: Common parent for custom report data stores.
DataStore
API\Reports\Downloads\DataStore.
Query
API\Reports\Downloads\Query
DataStore
API\Reports\Downloads\Stats\DataStore.
Query
API\Reports\Downloads\Stats\Query
DataStore
API\Reports\Orders\DataStore.
Query
API\Reports\Orders\Query
DataStore
API\Reports\Orders\Stats\DataStore.
Query
API\Reports\Orders\Stats\Query
Segmenter
Date & time interval and numeric range handling class for Reporting API.
ParameterException
API\Reports\ParameterException class.
DataStore
API\Reports\Products\DataStore.
Query
API\Reports\Products\Query
DataStore
API\Reports\Products\Stats\DataStore.
Query
API\Reports\Products\Stats\Query
Segmenter
Date & time interval and numeric range handling class for Reporting API.
Query
Admin\API\Reports\Query
Query
API\Reports\Revenue\Query
Segmenter
Date & time interval and numeric range handling class for Reporting API.
SqlQuery
Admin\API\Reports\SqlQuery: Common parent for manipulating SQL query clauses.
DataStore
API\Reports\Stock\Stats\DataStore.
Query
API\Reports\Stock\Stats\Query
DataStore
API\Reports\Taxes\DataStore.
Query
API\Reports\Taxes\Query
DataStore
API\Reports\Taxes\Stats\DataStore.
Query
API\Reports\Taxes\Stats\Query
Segmenter
Date & time interval and numeric range handling class for Reporting API.
TimeInterval
Date & time interval and numeric range handling class for Reporting API.
DataStore
API\Reports\Variations\DataStore.
Query
API\Reports\Variations\Query
DataStore
API\Reports\Variations\Stats\DataStore.
Query
API\Reports\Variations\Stats\Query
Segmenter
Date & time interval and numeric range handling class for Reporting API.
Package
Main package class.
DataSourcePoller
Specs data source poller class.
CurrentDateTimeProvider
Current DateTime Provider.
DeprecatedClassFacade
A facade to allow deprecating an entire class.
FeaturePlugin
Feature plugin main class.
Init
Loads assets related to the async category field for the product editor.
Features
Features Class.
NewProductManagementExperience
Loads assets related to the new product management experience page.
Onboarding
Contains backend logic for the onboarding profile and checklist feature.
DeprecatedExtendedTask
DeprecatedExtendedTask class.
DeprecatedOptions
DeprecatedOptions class.
Init
Contains the logic for completing onboarding tasks.
Task
Task class.
TaskList
Task List class.
TaskLists
Task Lists class.
TaskListSection
Task List section class.
AdditionalPayments
Payments Task
Appearance
Appearance Task
ExperimentalShippingRecommendation
Shipping Task
GetMobileApp
Get Mobile App Task
Marketing
Marketing Task
Payments
Payments Task
Products
Products Task
Purchase
Purchase Task
ReviewShippingOptions
Review Shipping Options Task
Shipping
Shipping Task
StoreCreation
Store Details Task
StoreDetails
Store Details Task
Tax
Tax Task
TourInAppMarketplace
Tour In-App Marketplace task
WooCommercePayments
WooCommercePayments Task
DefaultPaymentGateways
Default Payment Gateways
EvaluateSuggestion
Evaluates the spec and returns the evaluated suggestion.
Init
Remote Payment Methods engine.
PaymentGatewaysController
PaymentGateway class
PaymentGatewaySuggestionsDataSourcePoller
Specs data source poller class for payment gateway suggestions.
BlockRegistry
Product block registration and style registration functionality.
Init
Loads assets related to the product block editor.
RedirectionController
Handle redirecting to the old or new editor based on features and support.
Tracks
Add tracks for the product block editor.
DefaultShippingPartners
Default Shipping Partners
ShippingPartnerSuggestions
Class ShippingPartnerSuggestions
ShippingPartnerSuggestionsDataSourcePoller
Specs data source poller class for shipping partner suggestions.
TransientNotices
Shows print shipping label banner on edit order page.
Loader
Loader Class.
InstalledExtensions
Installed Marketing Extensions class.
MarketingCampaign
MarketingCampaign class
MarketingCampaignType
MarketingCampaignType class
MarketingChannels
MarketingChannels repository class
Price
Price class
DataStore
WC Admin Note Data Store (Custom Tables)
WC_Admin_Note
WC_Admin_Note.
WC_Admin_Notes
WC_Admin_Notes.
WC_Admin_Notes_Coupon_Page_Moved
WC_Admin_Notes_Coupon_Page_Moved.
WC_Admin_Notes_Customize_Store_With_Blocks
WC_Admin_Notes_Customize_Store_With_Blocks.
WC_Admin_Notes_Edit_Products_On_The_Move
WC_Admin_Notes_Edit_Products_On_The_Move.
WC_Admin_Notes_EU_VAT_Number
WC_Admin_Notes_EU_VAT_Number.
WC_Admin_Notes_Facebook_Marketing_Expert
WC_Admin_Notes_Facebook_Marketing_Expert.
WC_Admin_Notes_First_Product
WC_Admin_Notes_First_Product.
WC_Admin_Notes_Giving_Feedback_Notes
WC_Admin_Notes_Giving_Feedback_Notes.
WC_Admin_Notes_Install_JP_And_WCS_Plugins
WC_Admin_Notes_Install_JP_And_WCS_Plugins.
WC_Admin_Notes_Launch_Checklist
WC_Admin_Notes_Launch_Checklist.
WC_Admin_Notes_Migrate_From_Shopify
WC_Admin_Notes_Migrate_From_Shopify.
WC_Admin_Notes_Mobile_App
WC_Admin_Notes_Mobile_App.
WC_Admin_Notes_New_Sales_Record
WC_Admin_Notes_New_Sales_Record.
WC_Admin_Notes_Onboarding_Email_Marketing
WC_Admin_Notes_Onboarding_Email_Marketing.
WC_Admin_Notes_Onboarding_Payments
WC_Admin_Notes_Onboarding_Payments.
WC_Admin_Notes_Online_Clothing_Store
WC_Admin_Notes_Online_Clothing_Store.
WC_Admin_Notes_Order_Milestones
WC_Admin_Notes_Order_Milestones.
WC_Admin_Notes_Performance_On_Mobile
WC_Admin_Notes_Performance_On_Mobile.
WC_Admin_Notes_Personalize_Store
WC_Admin_Notes_Personalize_Store.
WC_Admin_Notes_Real_Time_Order_Alerts
WC_Admin_Notes_Real_Time_Order_Alerts.
WC_Admin_Notes_Selling_Online_Courses
WC_Admin_Notes_Selling_Online_Courses.
WC_Admin_Notes_Test_Checkout
WC_Admin_Notes_Test_Checkout.
WC_Admin_Notes_Tracking_Opt_In
WC_Admin_Notes_Tracking_Opt_In.
WC_Admin_Notes_Woo_Subscriptions_Notes
WC_Admin_Notes_Woo_Subscriptions_Notes.
WC_Admin_Notes_WooCommerce_Payments
WC_Admin_Notes_WooCommerce_Payments.
WC_Admin_Notes_WooCommerce_Subscriptions
WC_Admin_Notes_WooCommerce_Subscriptions.
Note
Note class.
Notes
Admin Notes class.
NotesUnavailableException
Notes\NotesUnavailableException class.
Order
WC_Order subclass.
OrderRefund
WC_Order_Refund subclass.
ThemeUpgrader
Admin\Overrides\ThemeUpgrader Class.
ThemeUpgraderSkin
Admin\Overrides\ThemeUpgraderSkin Class.
PageController
PageController
PluginsHelper
Class PluginsHelper
PluginsInstaller
Class PluginsInstaller
AsyncPluginsInstallLogger
A logger to log plugin installation progress in real time to an option.
PluginsProvider
Plugins Provider.
BaseLocationCountryRuleProcessor
Rule processor that performs a comparison operation against the base location - country.
BaseLocationStateRuleProcessor
Rule processor that performs a comparison operation against the base location - state.
ComparisonOperation
Compare two operands using the specified operation.
DataSourcePoller
Specs data source poller class.
EvaluateAndGetStatus
Evaluates the spec and returns a status.
FailRuleProcessor
Rule processor that fails.
GetRuleProcessor
Class encapsulating getting the processor for a given rule type.
NoteStatusRuleProcessor
Rule processor that compares against the status of another note.
NotRuleProcessor
Rule processor that negates the rules in the rule's operand.
OnboardingProfileRuleProcessor
Rule processor that performs a comparison operation against a value in the onboarding profile.
OptionRuleProcessor
Rule processor that performs a comparison operation against an option value.
OrderCountRuleProcessor
Rule processor for publishing based on the number of orders.
OrdersProvider
Provider for order-related queries and operations.
OrRuleProcessor
Rule processor that performs an OR operation on the rule's left and right operands.
PassRuleProcessor
Rule processor that passes.
PluginsActivatedRuleProcessor
Rule processor for sending when the provided plugins are activated.
PluginVersionRuleProcessor
Rule processor for sending when the provided plugin is activated and matches the specified version.
ProductCountRuleProcessor
Rule processor that performs a comparison operation against the number of products.
PublishAfterTimeRuleProcessor
Rule processor for sending after a specified date/time.
PublishBeforeTimeRuleProcessor
Rule processor for sending before a specified date/time.
RemoteInboxNotificationsEngine
Remote Inbox Notifications engine.
RuleEvaluator
Evaluate the given rules as an AND operation - return false early if a rule evaluates to false.
SpecRunner
Runs a single spec.
StoredStateRuleProcessor
Rule processor that performs a comparison operation against a value in the stored state object.
StoredStateSetupForProducts
Handles stored state setup for products.
TotalPaymentsVolumeProcessor
Rule processor that passes when a store's payments volume exceeds a provided amount.
WCAdminActiveForProvider
WCAdminActiveForProvider class
WCAdminActiveForRuleProcessor
Rule processor for publishing if wc-admin has been active for at least the given number of seconds.
WooCommerceAdminUpdatedRuleProcessor
Rule processor for sending when WooCommerce Admin has been updated.
ReportCSVEmail
ReportCSVEmail Class.
ReportCSVExporter
ReportCSVExporter Class.
ReportExporter
ReportExporter Class.
ReportsSync
ReportsSync Class.
WCAdminHelper
Class WCAdminHelper
Autoloader
Autoloader class.
OrderCache
A class to cache order objects.
OrderCacheController
A class to control the usage of the orders cache.
CacheException
Exception thrown by classes derived from ObjectCache.
ObjectCache
Base class for caching objects (or associative arrays) that have a unique identifier.
WPCacheEngine
Implementation of CacheEngine that uses the built-in WordPress cache.
ReserveStock
Stock Reservation class.
ReserveStockException
ReserveStockException class.
Container
PSR11 compliant dependency injection container for WooCommerce.
CLIRunner
CLI tool for migrating order data to/from custom table.
PostToOrderTableMigrator
Helper class to migrate records from the WordPress post table to the custom order table (and only that table - PostsToOrdersMigrationController is used for fully migrating orders).
MigrationHelper
Helper class to assist with migration related operations.
Packages
Packages class.
ActionsProxy
Proxy for interacting with WordPress actions and filters.
LegacyProxy
Proxy class to access legacy WooCommerce functionality.
ArrayUtil
A class of utilities for dealing with arrays.
FeaturesUtil
Class with methods that allow to retrieve information about the existing WooCommerce features, also has methods for WooCommerce plugins to declare (in)compatibility with the features.
I18nUtil
A class of utilities for dealing with internationalization.
NumberUtil
A class of utilities for dealing with numbers.
OrderUtil
A class of utilities for dealing with orders.
PluginUtil
A class of utilities for dealing with plugins.
StringUtil
A class of utilities for dealing with strings.
ArgumentResolverTrait
ContainerAwareTrait
ExportableTraits
ExportableTraits class.
TaskTraits
TaskTraits class.
NoteTraits
NoteTraits class.
OrderTraits
OrderTraits class.
SchedulerTraits
SchedulerTraits class.
CacheNameSpaceTrait
Implements namespacing algorithm to simulate grouping and namespacing for wp_cache, memcache and other caching engines that don't support grouping natively.

Table of Contents

wc_admin_get_feature_config()  : mixed
WC()  : WooCommerce
Returns the main instance of WC.
wc_get_container()  : Container
Returns the WooCommerce object container.

Functions

wc_get_container()

Returns the WooCommerce object container.

wc_get_container() : Container

Code in the includes directory should use the container to get instances of classes in the src directory.

Tags
since
4.4.0