Introduce a new filter for 'get_cart_contents'

This commit is contained in:
Boro Sitnikovski 2018-10-29 21:08:22 +01:00
parent 8c977d67e1
commit 8c6226e7bd
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ class WC_Cart extends WC_Legacy_Cart {
* @return array of cart items
*/
public function get_cart_contents() {
return (array) $this->cart_contents;
return apply_filters( 'woocommerce_get_cart_contents', (array) $this->cart_contents );
}
/**