Package WooCommerce\Functions

Packages summary

WooCommerce\Functions\Archives
WooCommerce\Functions\Cart
WooCommerce\Functions\Checkout
WooCommerce\Functions\Forms
WooCommerce\Functions\Loop
WooCommerce\Functions\Orders
WooCommerce\Functions\Product

Functions summary

_wc_get_product_terms_parent_usort_callback Sort by parent
_wc_term_recount Function for recounting product terms, ignoring hidden products.
_woocommerce_term_recount
add_woocommerce_term_meta WooCommerce Term Meta API - Add term meta
delete_woocommerce_term_meta WooCommerce Term Meta API - Delete term meta
get_product Main function for returning products, uses the WC_Product_Factory class.
get_woocommerce_api_url Get the URL to the WooCommerce REST API
get_woocommerce_currencies Get full list of currency codes.
get_woocommerce_currency Get Base Currency Code.
get_woocommerce_currency_symbol Get Currency symbol.
get_woocommerce_price_format Get the price format depending on the currency position
get_woocommerce_term_meta WooCommerce Term Meta API - Get term meta
is_account_page is_account_page - Returns true when viewing an account page.
is_add_payment_method_page is_add_payment_method_page - Returns true when viewing the add payment method page.
is_ajax is_ajax - Returns true when the page is loaded via ajax.
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_filtered is_filtered - Returns true when filtering products using layered nav or price sliders.
is_order_received_page is_order_received_page - Returns true when viewing the order received page.
is_product is_product - Returns true when viewing a single product.
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_taxonomy is_product_taxonomy - Returns true when viewing a product taxonomy archive.
is_shop is_shop - Returns true when viewing the product type archive (shop).
is_store_notice_showing is_store_notice_showing - Returns true when store notice is active.
is_wc_endpoint_url is_wc_endpoint_url - Check if an endpoint is showing
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)
meta_is_product_attribute Returns true when the passed meta name is a product attribute.
taxonomy_is_product_attribute Returns true when the passed taxonomy name is a product attribute.
update_woocommerce_term_meta WooCommerce Term Meta API - Update term meta
wc_add_notice Add and store a notice
wc_add_order_item Add a item to an order (for example a line item).
wc_add_order_item_meta WooCommerce Order Item Meta API - Add term meta
wc_add_to_cart_message Add to cart messages.
wc_array_overlay Merge two arrays
wc_attribute_label Get a product attributes label.
wc_attribute_orderby Get a product attributes orderby setting.
wc_attribute_taxonomy_name Get a product attributes name.
wc_body_class Add body classes for WC pages
wc_cancel_unpaid_orders Cancel all unpaid orders after held duration to prevent stock lock for those products
wc_cart_totals_coupon_html Get a coupon value
wc_cart_totals_coupon_label Get a coupon label
wc_cart_totals_fee_html Get the fee value
wc_cart_totals_order_total_html Get order total html including inc tax if needed
wc_cart_totals_shipping_html Get shipping methods
wc_cart_totals_shipping_method_label Get a shipping methods full label including price
wc_cart_totals_subtotal_html Get the subtotal
wc_cart_totals_taxes_total_html Get taxes total
wc_change_term_counts Overrides the original term count for product categories and tags with the product count that takes catalog visibility into account.
wc_clean Clean variables
wc_clear_cart_after_payment Clear cart after payment.
wc_clear_notices Unset all notices
wc_create_new_customer Create a new customer
wc_customer_bought_product Checks if a user (by email) has bought an item
wc_customer_edit_account_url Get the link to the edit account details page
wc_customer_has_capability Checks if a user has a certain capability
wc_date_format WooCommerce Date Format - Allows to change date format for everything WooCommerce
wc_delete_order_item Delete an item from the order it belongs to based on item id
wc_delete_order_item_meta WooCommerce Order Item Meta API - Delete term meta
wc_delete_product_transients Clear all transients cache for product data.
wc_delete_shop_order_transients Clear all transients cache for order data.
wc_disable_admin_bar Prevent any user who cannot 'edit_posts' (subscribers, customers etc) from seeing the admin bar
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_empty_cart Clears the cart session when called
wc_enqueue_js Queue some JavaScript code to be output in the footer.
wc_float_to_string Convert a float to a string without locale formatting which PHP adds when changing floats to strings
wc_format_decimal Format decimal numbers ready for DB storage
wc_format_hex Format string as hex
wc_format_localized_decimal Format a decimal with PHP Locale settings
wc_format_localized_price Format a price with WC Currency Locale settings
wc_format_phone_number format_phone function.
wc_format_postcode Format the postcode according to the country and length of the postcode
wc_generator_tag Output generator tag to aid debugging.
wc_get_attachment_image_attributes wc_get_attachment_image_attributes function.
wc_get_attribute_taxonomies Get attribute taxonomies.
wc_get_attribute_taxonomy_names Get an array of product attribute taxonomies.
wc_get_coupon_type Get a coupon type's name.
wc_get_coupon_types Get coupon types.
wc_get_dimension Normalise dimensions, unify to cm then convert to wanted unit value
wc_get_endpoint_url Get endpoint URL
wc_get_featured_product_ids Function that returns an array containing the IDs of the featured products.
wc_get_filename_from_url Gets the filename part of a download URL
wc_get_formatted_variation Variation Formatting
wc_get_image_size Get an image size.
wc_get_notices Returns all queued notices, optionally filtered by a notice type.
wc_get_order_id_by_order_key Finds an Order ID based on an order key.
wc_get_order_item_meta WooCommerce Order Item Meta API - Get term meta
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_product_ids_on_sale Function that returns an array containing the IDs of the products that are on sale.
wc_get_product_terms Wrapper for wp_get_post_terms which supports ordering by parent.
wc_get_template Get other templates (e.g. product attributes) passing attributes and including the file.
wc_get_template_part Get template part (for templates like the shop-loop).
wc_get_weight Normalise weights, unify to cm then convert to wanted unit value
wc_has_notice See if a notice has already been added
wc_hex_darker Hex darker/lighter/contrast functions for colours
wc_hex_lighter Hex darker/lighter/contrast functions for colours
wc_let_to_num let_to_num function.
wc_light_or_dark Detect if we should use a light or dark colour on a background colour
wc_list_pages Fix active class in wp_list_pages for shop page.
wc_load_persistent_cart Load the cart upon login
wc_locate_template Locate a template and return the path for inclusion.
wc_lostpassword_url Returns the url to the lost password endpoint url
wc_mail Send HTML emails from WooCommerce
wc_nav_menu_item_classes Fix active class in nav for shop page.
wc_nav_menu_items Hide menu items conditionally
wc_notice_count Get the count of notices added, either for all notices (default) or for one particular notice type specified by $notice_type.
wc_paying_customer Order Status completed - This is a paying customer
wc_placeholder_img Get the placeholder image
wc_placeholder_img_src Get the placeholder image URL for products etc
wc_prepare_attachment_for_js wc_prepare_attachment_for_js function.
wc_price Format the price with a currency symbol.
wc_print_js Output any queued javascript code in the footer.
wc_print_notice Print a single notice immediately
wc_print_notices Prints messages and errors which are stored in the session, then clears them.
wc_processing_order_count Return the count of processing orders.
wc_product_dimensions_enabled Returns whether or not product dimensions (HxWxD) are enabled.
wc_product_dropdown_categories WooCommerce Dropdown categories
wc_product_post_class Adds extra post classes for products
wc_product_post_type_link Filter to allow product_cat in the permalinks for products.
wc_product_sku_enabled Returns whether or not SKUS are enabled.
wc_product_weight_enabled Returns whether or not product weights are enabled.
wc_products_rss_feed Products RSS Feed.
wc_protected_product_add_to_cart Prevent password protected products being added to the cart
wc_recount_after_stock_change Recount terms after the stock amount changes
wc_reorder_terms Move a term before the a given element of its hierarchy level
wc_rgb_from_hex Hex darker/lighter/contrast functions for colours
wc_round_tax_total Round a tax amount
wc_sanitize_taxonomy_name Sanitize taxonomy names. Slug format (no spaces, lowercase).
wc_scheduled_sales Function which handles the start and end of scheduled sales via cron.
wc_set_customer_auth_cookie Login a customer (set auth cookie and set global user object)
wc_set_term_order Set the sort order of a term
wc_setcookie Set a cookie - wrapper for setcookie using WP constants
wc_setup_product_data When the_post is called, put product data into a global.
wc_taxonomy_metadata_wpdbfix WooCommerce Term/Order item Meta API - set table name
wc_template_redirect Handle redirects before content is output - hooked into template_redirect so is_page works.
wc_terms_clauses Add term ordering to get_terms
wc_time_format WooCommerce Time Format - Allows to change time format for everything WooCommerce
wc_timezone_string WooCommerce Timezone - helper to retrieve the timezone string for a site until a WP core method exists (see http://core.trac.wordpress.org/ticket/24730)
wc_track_product_view Track product views
wc_trim_zeros Trim trailing zeros off prices.
wc_update_new_customer_past_orders Get past orders (by email) and update them
wc_update_order_item_meta WooCommerce Order Item Meta API - Update term meta
wc_update_product_stock Update a product's stock amount
wc_update_product_stock_status Update a product's stock status
wc_walk_category_dropdown_tree Walk the Product Categories.
woocommerce_add_order_item
woocommerce_add_order_item_meta
woocommerce_add_to_cart_message
woocommerce_admin_scripts
woocommerce_array_overlay
woocommerce_breadcrumb Output the WooCommerce Breadcrumb
woocommerce_cancel_unpaid_orders
woocommerce_cart_totals_coupon_html
woocommerce_cart_totals_fee_html
woocommerce_cart_totals_order_total_html
woocommerce_cart_totals_shipping_html
woocommerce_cart_totals_shipping_method_label
woocommerce_cart_totals_subtotal_html
woocommerce_change_term_counts
woocommerce_clean
woocommerce_clear_cart_after_payment
woocommerce_content Output WooCommerce content.
woocommerce_create_new_customer
woocommerce_create_page
woocommerce_cross_sell_display Output the cart cross-sells.
woocommerce_customer_bought_product
woocommerce_customer_edit_account_url
woocommerce_customer_has_capability
woocommerce_date_format
woocommerce_datepicker_js
woocommerce_default_product_tabs Add default product tabs to product pages.
woocommerce_delete_order_item
woocommerce_delete_order_item_meta
woocommerce_demo_store Adds a demo store banner to the site if enabled
woocommerce_deprecated_filter_mapping
woocommerce_disable_admin_bar Customer functions (soft deprecated)
woocommerce_downloadable_file_permission
woocommerce_downloadable_product_permissions
woocommerce_empty_cart
woocommerce_format_decimal
woocommerce_format_hex
woocommerce_get_attachment_image_attributes
woocommerce_get_dimension
woocommerce_get_endpoint_url
woocommerce_get_featured_product_ids
woocommerce_get_filename_from_url
woocommerce_get_formatted_variation
woocommerce_get_order_id_by_order_key Order functions (soft deprecated)
woocommerce_get_order_item_meta
woocommerce_get_page_id Page functions (soft deprecated)
woocommerce_get_product_ids_on_sale Product functions - soft deprecated
woocommerce_get_product_schema Get a products Schema
woocommerce_get_product_terms
woocommerce_get_sidebar Get the shop sidebar template.
woocommerce_get_template
woocommerce_get_template_part Core functions (soft deprecated)
woocommerce_get_weight
woocommerce_hex_darker
woocommerce_hex_lighter
woocommerce_legacy_paypal_ipn Handle IPN requests for the legacy paypal gateway by calling gateways manually if needed.
woocommerce_let_to_num
woocommerce_light_or_dark
woocommerce_list_pages
woocommerce_load_persistent_cart
woocommerce_locate_template
woocommerce_lostpassword_url
woocommerce_mail
woocommerce_mini_cart Output the Mini-cart - used by cart widget
woocommerce_nav_menu_item_classes
woocommerce_nav_menu_items
woocommerce_order_terms
woocommerce_output_content_wrapper Output the start of the page wrapper.
woocommerce_output_content_wrapper_end Output the end of the page wrapper.
woocommerce_page_title woocommerce_page_title function.
woocommerce_paying_customer
woocommerce_placeholder_img
woocommerce_placeholder_img_src
woocommerce_prepare_attachment_for_js
woocommerce_price
woocommerce_processing_order_count
woocommerce_product_dropdown_categories Attribute functions - soft deprecated
woocommerce_product_loop_end Output the end of a product loop. By default this is a UL
woocommerce_product_loop_start Output the start of a product loop. By default this is a UL
woocommerce_product_post_type_link
woocommerce_protected_product_add_to_cart Cart functions (soft deprecated)
woocommerce_quantity_input Output the quantity input for add to cart forms.
woocommerce_readfile_chunked
woocommerce_recount_after_stock_change
woocommerce_related_products Output the related products.
woocommerce_rgb_from_hex
woocommerce_round_tax_total
woocommerce_sanitize_taxonomy_name Formatting functions (soft deprecated)
woocommerce_scheduled_sales
woocommerce_set_customer_auth_cookie
woocommerce_set_term_order
woocommerce_show_messages
woocommerce_sort_product_tabs Sort tabs by priority
woocommerce_taxonomy_metadata_wpdbfix
woocommerce_terms_clauses
woocommerce_time_format
woocommerce_timezone_string
woocommerce_tooltip_js
woocommerce_track_product_view
woocommerce_trim_zeros
woocommerce_update_new_customer_past_orders
woocommerce_update_order_item_meta
woocommerce_upsell_display Output product up sells.
woocommerce_walk_category_dropdown_tree
woocommerce_weekend_area_js
WooCommerce API documentation generated by ApiGen 2.8.0