Skip to content
Advertisement

How would I correctly parse this PHP?

I know the PHP part of this code is wrong but I can’t figure out how to write it correctly. Can someone give me a hand?

JavaScript

Advertisement

Answer

No need to <?php echo from PHP, concatenate the value you need (WC()->cart->get_cart_contents_count()). Change to:

JavaScript

https://www.php.net/manual/en/language.operators.string.php

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement