mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-01 11:52:25 +08:00
6 lines
207 B
Text
6 lines
207 B
Text
add_filter( 'woocommerce_cart_contents_count', 'wc_alter_cart_contents_count', 9999, 1 );
|
|
|
|
function wc_alter_cart_contents_count( $count ) {
|
|
$count = count( WC()->cart->get_cart() );
|
|
return $count;
|
|
}
|