Hey I am using Woocommerce with an additional extension (Woocommerce Bookings and I wondered if there is custom code that would display the booking date and time (not the order date and time) in the woocommerce order preview I found several codes mostly by LoicTheAztec that let you insert product and customer information in certain columns. If you click on
Tag: wordpress
Add variable product downloadable files based on variation attributes in WooCommerce
I am trying to check if a product variation is currently in the cart, and add dynamic content to the email & thank you pages based on which variable products are present. The dynamic content would be generated via custom file input fields (ACF) added to the product on the admin side. I’ve managed to put together the following code:
How to display a $_SESSION variable in custom woocommerce checkout field?
I am able to verify by viewing the “Application” tab in the dev tools that my session variable has carried over to the checkout page; and I have the WC hook setup that allows me to change the “default”/value of the field I want to insert data into. However, I am unable to get them to read each other. As
HTML form rendering with weird hidden input fields
I have a new ecommerce site, which uses lead forms to collect customer info. On our live production site, there are hidden input fields with encrypted looking name and value attributes. Here is an example: These fields are not present in the template code, so I don’t know why or how they are getting added to the live pages. I
get post meta for all id [closed]
I want to get all brands from DB. It should work like get_post_meta( get_the_id(), ‘make’, true); but without id. It should contain an array with all brands. Which command I should use?
Can I add data to an incoming REST request in WordPress?
I’m currently looking for a way to add additional data to a WordPress REST request directly when it reaches WordPress so that I can access the data “later” in each REST route callback. I’ve …
use custome zone in woocommerce in wordpress plugin development
so this is my code and add_filter( ‘woocommerce_states’, ‘woo_custom_shipping_zones’ ); its not working inside in my function but if i put it outside and reactivate my plugin its working how can use this filter inside the function? Answer You could use Wordpress options to solve the problem: The code should work. Add it to your active theme’s functions.php.
Add, update or remove product custom field in WooCommerce
I use the following lines to save a Value to the database. I have one question regarding this code, when I delete input it still keeps it. The only way to delete that is to put (space) as input. $…
woocommerce order notes in order preview
I am trying to add all manual admin notes from order on order preview. I want to make it with their date & time bellow, with small text and sort by same way as backend. Code i writed is: But seems this method for data {{ data.data.field_id }} it’s not working for it. If i try global post or $order
How to Go to New WordPress Post After Programmatically Creating It?
I created a PHP function that will automatically create a new WordPress post based on content added onto a page. However, it just stays on the current page but I want it to go to that new created post. How could I redirect so that it goes to that post? Here’s what I have so far: Answer You can use