WooCommerce Code Reference
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hook Reference
  • WooCommerce Docs
  • REST API Docs

Packages

  • None
  • WooCommerce
    • Abstracts
    • Admin
      • Customize
      • Functions
      • Importers
      • Meta
      • Reports
      • System
    • API
    • Classes
      • Data
        • Store
      • Emails
      • Embed
      • Integrations
      • Interfaces
      • Log
        • Handlers
      • Payment
      • Products
      • Shipping
      • Walkers
    • Export
    • Functions
    • Import
    • l10n
    • PaymentTokens
    • PayPal
    • Shortcodes
      • Cart
      • Checkout
      • My
        • Account
      • Order
        • Tracking
    • Webhooks
    • Widgets
  • WP-Background-Processing

Classes

  • Abstract_WC_Order_Item_Type_Data_Store
  • Emogrifier
  • Simplify
  • Simplify_AccessToken
  • Simplify_Authentication
  • Simplify_Authorization
  • Simplify_CardToken
  • Simplify_Chargeback
  • Simplify_Constants
  • Simplify_Coupon
  • Simplify_Customer
  • Simplify_Deposit
  • Simplify_Event
  • Simplify_FieldError
  • Simplify_FraudCheck
  • Simplify_HTTP
  • Simplify_Invoice
  • Simplify_InvoiceItem
  • Simplify_Object
  • Simplify_Payment
  • Simplify_PaymentsApi
  • Simplify_Plan
  • Simplify_Refund
  • Simplify_ResourceList
  • Simplify_Subscription
  • Simplify_Tax
  • Simplify_TransactionReview
  • Simplify_Webhook
  • WC_Admin_Duplicate_Product
  • WC_API_Authentication
  • WC_API_Coupons
  • WC_API_Customers
  • WC_API_Exception
  • WC_API_Handler
  • WC_API_JSON_Handler
  • WC_API_Orders
  • WC_API_Products
  • WC_API_Reports
  • WC_API_Resource
  • WC_API_Server
  • WC_API_Webhooks
  • WC_Coupon_Data_Store_CPT
  • WC_Customer_Data_Store
  • WC_Customer_Data_Store_Session
  • WC_Customer_Download_Data_Store
  • WC_Customer_Download_Log_Data_Store
  • WC_Data_Store
  • WC_Data_Store_WP
  • WC_Eval_Math
  • WC_Eval_Math_Stack
  • WC_Gateway_Paypal_API_Handler
  • WC_Gateway_Paypal_PDT_Handler
  • WC_Gateway_Paypal_Refund
  • WC_Gateway_Paypal_Request
  • WC_Gateway_Paypal_Response
  • WC_Helper
  • WC_Helper_API
  • WC_Helper_Compat
  • WC_Helper_Options
  • WC_Helper_Plugin_Info
  • WC_Helper_Updater
  • WC_Order_Item_Coupon_Data_Store
  • WC_Order_Item_Data_Store
  • WC_Order_Item_Fee_Data_Store
  • WC_Order_Item_Product_Data_Store
  • WC_Order_Item_Shipping_Data_Store
  • WC_Order_Item_Tax_Data_Store
  • WC_Order_Refund_Data_Store_CPT
  • WC_Payment_Token_Data_Store
  • WC_Product_Grouped_Data_Store_CPT
  • WC_Product_Variation_Data_Store_CPT
  • WC_Shipping_Zone_Data_Store

Interfaces

  • WC_Abstract_Order_Data_Store_Interface
  • WC_Coupon_Data_Store_Interface
  • WC_Customer_Data_Store_Interface
  • WC_Customer_Download_Data_Store_Interface
  • WC_Customer_Download_Log_Data_Store_Interface
  • WC_Log_Handler_Interface
  • WC_Logger_Interface
  • WC_Object_Data_Store_Interface
  • WC_Order_Data_Store_Interface
  • WC_Order_Item_Data_Store_Interface
  • WC_Order_Item_Product_Data_Store_Interface
  • WC_Order_Item_Type_Data_Store_Interface
  • WC_Order_Refund_Data_Store_Interface
  • WC_Payment_Token_Data_Store_Interface
  • WC_Product_Data_Store_Interface
  • WC_Product_Variable_Data_Store_Interface
  • WC_Shipping_Zone_Data_Store_Interface

Exceptions

  • Simplify_ApiConnectionException
  • Simplify_ApiException
  • Simplify_AuthenticationException
  • Simplify_BadRequestException
  • Simplify_NotAllowedException
  • Simplify_ObjectNotFoundException
  • Simplify_SystemException

Functions

  • wc_coupons_enabled
  • wc_get_cart_coupon_types
  • wc_get_coupon_code_by_id
  • wc_get_coupon_id_by_code
  • wc_get_coupon_type
  • wc_get_coupon_types
  • wc_get_product_coupon_types
  • wc_importer_current_locale
  • wc_importer_default_english_mappings
  • wc_importer_default_special_english_mappings
  • wc_importer_generic_mappings
  • wc_importer_wordpress_mappings

Interface WC_Logger_Interface

WC Logger Interface

Functions that must be defined to correctly fulfill logger API.

Direct known implementers

WC_Logger

Category: Interface
Author: WooThemes
Version: 1.0.0
Located at interfaces/class-wc-logger-interface.php

Methods summary

public boolean
# add( string $handle, string $message, string $level = WC_Log_Levels::NOTICE )

Add a log entry.

Add a log entry.

This is not the preferred method for adding log messages. Please use log() or any one of the level methods (debug(), info(), etc.). This method may be deprecated in the future.

Parameters

$handle
$message
$level

Returns

boolean
True if log was added, otherwise false.
public
# log( string $level, string $message, array $context = array() )

Add a log entry.

Add a log entry.

Parameters

$level

One of the following: 'emergency': System is unusable. 'alert': Action must be taken immediately. 'critical': Critical conditions. 'error': Error conditions. 'warning': Warning conditions. 'notice': Normal but significant condition. 'info': Informational messages. 'debug': Debug-level messages.

$message
Log message.
$context
Optional. Additional information for log handlers.
public
# emergency( string $message, array $context = array() )

Adds an emergency level message.

Adds an emergency level message.

System is unusable.

Parameters

$message
Log message.
$context
Optional. Additional information for log handlers.
public
# alert( string $message, array $context = array() )

Adds an alert level message.

Adds an alert level message.

Action must be taken immediately. Example: Entire website down, database unavailable, etc.

Parameters

$message
Log message.
$context
Optional. Additional information for log handlers.
public
# critical( string $message, array $context = array() )

Adds a critical level message.

Adds a critical level message.

Critical conditions. Example: Application component unavailable, unexpected exception.

Parameters

$message
Log message.
$context
Optional. Additional information for log handlers.
public
# error( string $message, array $context = array() )

Adds an error level message.

Adds an error level message.

Runtime errors that do not require immediate action but should typically be logged and monitored.

Parameters

$message
Log message.
$context
Optional. Additional information for log handlers.
public
# warning( string $message, array $context = array() )

Adds a warning level message.

Adds a warning level message.

Exceptional occurrences that are not errors.

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

Parameters

$message
Log message.
$context
Optional. Additional information for log handlers.
public
# notice( string $message, array $context = array() )

Adds a notice level message.

Adds a notice level message.

Normal but significant events.

Parameters

$message
Log message.
$context
Optional. Additional information for log handlers.
public
# info( string $message, array $context = array() )

Adds a info level message.

Adds a info level message.

Interesting events. Example: User logs in, SQL logs.

Parameters

$message
Log message.
$context
Optional. Additional information for log handlers.
public
# debug( string $message, array $context = array() )

Adds a debug level message.

Adds a debug level message.

Detailed debug information.

Parameters

$message
Log message.
$context
Optional. Additional information for log handlers.
WooCommerce Code Reference API documentation generated by ApiGen