Creating a variable string
-
Hi there @pomegranate or anyone else who can help,
This may be a very simple question – but I’m finding myself dumbfounded.
On my own custom pdf invoice template, I’m try to create a variable… or simply dump certain values in strings to use in some conditional statements.
For example, the template has $wpo_wcpdf->order_number(); and I would like to use the order number to pull some other information.
Likewise with a custom field I have made – $this->custom_field(‘Chosen Pickup Location’);Both of these will print out the correct information on the page when used, but they can’t be made into string variables to use if statements etc
As an example of what I’m trying to do:
$location = $this->custom_field(‘Chosen Pickup Location’);
if ($location == get_the_title($post->ID)){
…
}Any ideas of what I’m looking over?
- The topic ‘Creating a variable string’ is closed to new replies.