woocommerce-compat.php
Provides backwards compatibility for sites running older versions of WooCommerce.
Tags
Table of Contents
- wc_esc_json() : string
- Escape JSON for use on HTML or attribute text nodes.
- woocommerce_product_loop() : bool
- Should the WooCommerce loop be displayed?
Functions
wc_esc_json()
Escape JSON for use on HTML or attribute text nodes.
wc_esc_json(string $json[, bool $html = false ]) : string
Parameters
- $json : string
-
JSON to escape.
- $html : bool = false
-
True if escaping for HTML text node, false for attributes. Determines how quotes are handled.
Tags
Return values
string —Escaped JSON.
woocommerce_product_loop()
Should the WooCommerce loop be displayed?
woocommerce_product_loop() : bool
This will return true if we have posts (products) or if we have subcats to display.