PHP Calls Using [RAW]
-
I’m trying to get this to work in order to (1) define a PHP variable and (2) echo that variable with another PHP script into a chunk of text on a WooCommerce Single-Product page.
Here’s what I’m doing – I’ve put the following on the page via the Text/HTML editor:
[raw] <?php global $state = "California";?> <?php include '../php/info-section.php';?> [/raw]
When I update the product page, the two PHP lines … disappear! In the text editor, it shows:
[raw] [/raw]
I’m guessing one of two things are happening: either the Raw HTML plugin doesn’t allow PHP calls, or I’m setting it up wrong.
The PHP works – I’ve tried it on a standard HTML/PHP page, but it does not work on a WooCommerce product page.
Any suggestions would be appreciated!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP Calls Using [RAW]’ is closed to new replies.