Title: PHP Calls Using [RAW]
Last modified: April 18, 2020

---

# PHP Calls Using [RAW]

 *  [WebTeamAdmin](https://wordpress.org/support/users/varsitysports/)
 * (@varsitysports)
 * [6 years ago](https://wordpress.org/support/topic/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)

 *  Plugin Author [Janis Elsts](https://wordpress.org/support/users/whiteshadow/)
 * (@whiteshadow)
 * [6 years ago](https://wordpress.org/support/topic/php-calls-using-raw/#post-12697463)
 * That’s not going to work with this plugin. Raw HTML cannot run PHP code. It’s
   only intended to be used for HTML/JS/CSS code.

Viewing 1 replies (of 1 total)

The topic ‘PHP Calls Using [RAW]’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/raw-html.svg)
 * [Raw HTML](https://wordpress.org/plugins/raw-html/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/raw-html/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/raw-html/)
 * [Active Topics](https://wordpress.org/support/plugin/raw-html/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/raw-html/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/raw-html/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 2 participants
 * Last reply from: [Janis Elsts](https://wordpress.org/support/users/whiteshadow/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/php-calls-using-raw/#post-12697463)
 * Status: not resolved