IF Controlled Add to Cart Loop Text
-
Hi all!
I am trying to modify the ‘add-to-cart.php’ file in the loop so that I can run the following PHP query:
<?php if(get_field('ad_activate_deposit') == "yes") { echo 'PLACE £99 DEPOSIT'; } else { echo 'ADD TO CART'; } ?>
I currently have the above code modifying the single product add to cart button quite simply, however I am struggling with the loop.
Any advice will be appreciated! ??
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘IF Controlled Add to Cart Loop Text’ is closed to new replies.