I’m new to WordPress and WooCommerce plugins and such. I’m writing a plugin and I need to send some data to a SOAP API, the case is that the API only accepts the state full name but I’m only getting …
Tag: woocommerce
Allow access to any order on front-end on WooCommerce
My goal is to allow certain role to view any order in shop. While displaying all orders in “My Account” page is relatively easy, accessing particular order created by different user always ends up with “Invalid order. My account” error. So far I have added custom query on woocommerce_my_account_my_orders_query filter, so that one can view all orders made by accounts
How to target an array of Product IDs in WooCommerce?
I’m using the code below to change a product price to text (Contact for Pricing) when the price field is left empty: It works for one product, but I’m having trouble getting it to work for multiple products. How do I target an array of product ids? Answer For an array of product IDs use in_array() conditional function as follows:
Shipping rates based on service custom delivery type and items total in Woocommerce
I just require a small help on displaying the correct shipping fees in my WordPress and woocommerce site. I have set my shipping fees as the following: Flat rate (Delivery): $10 Free Shipping (Free Delivery) Local Pickup (Pickup): $0 When I make an order and go onto the checkout page, it gives me the options to select from for shipping
How to get WooCommerce product object in a custom shortcode to avoid errors
I have a function in which i am trying to get the product short description of the current product using the product id but i keep getting Uncaught Error: Call to a member function get_short_description() on bool in I have the following shortcode function where I am trying to get the product short description of the current WooCommerce product using
Display bookings date time in Woocommerce admin order list
In Woocommerce with Woocommerce Bookings, I have the following to add the booking details in WooCommerce order preview, below each order item: How to display the booking date and time (not the order date and time) in in the woocommerce admin orders list under the billing_address column? Any help is appreciated. Answer You can use the following to display the
Add WooCommerce booking date and time to admin orders preview
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
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
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.