Introduce a new filter for 'get_cart_contents'
This commit is contained in:
parent
8c977d67e1
commit
8c6226e7bd
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue