Custom Variables
-
Hi there,
Would love to create a custom variable without having to edit your src code (for obvious update reasons). Looking at woosms/src/HookLoad.php:34, the $row object includes the correct meta pair already. Simply iterating through the array/object and setting all meta pairs would be great, and then continuing through the rest of your script to override those with more complex needs.At the moment, I’m using
$ymd = date_create_from_format('Y-m-d', $row->ywcdd_order_delivery_date); $variables->set('delivery_date', date_format($ymd,'l jS F'));
But as I said, I’d rather hook in with an action to add it outside of your plugin. Any ideas?
Thanks!
Jarrod.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom Variables’ is closed to new replies.