I cant figure out how to reorder the additional fields, on the checkout page in WooCommerce. I have added one extra field to the WooCommerce additional information section. I would like to show the time field first then the order notes below it. This is the code that I am using: However, this does not have the desired result. Can
Tag: woocommerce
Display product thumbnail in existing product column in WooCommerce quick order preview window
I’m trying to display WooCommerce product thumbnail to WooCommerce Quick order window, I tried using ‘woocommerce_admin_order_preview_end’ and ‘woocommerce_admin_order_preview_get_order_details’ in the below code but nothing changed, Can anyone point me in the right direction? thanks! My Attempted codes Answer Via woocommerce_admin_order_preview_line_item_columns filter hook, we have the option to remove the existing product column and add a new column, for order preview.
Display user name and phone on WordPress Dashboard custom widget
i am trying to display a custom widget on the dashboard, where the widget shows register date, user name and billing phone. i found an old plugin that has the php code but doesn’t show the billing phone, so i add the billing phone as the following the problem is am getting only the current login user phone for all
Add random string to WooCommerce order items based on product SKU
I have set up variable products within WooCommerce. Each variation has a unique SKU. My mission is to inspect the SKU within the cart, then according to the SKU, generate a number of random strings (16alphanumeric characters). If item (1) in the cart is SKU ‘ABC’, then (x) number of unique strings are generated and stored for the respective order.
Remove product (item) from WooCommerce checkout page using AJAX
I have added a removal link to the checkout for each product. This part works fine. Problem is; upon removal, the page is “scrolled to top”. I would like to change this by adding AJAX to the removal process. I’ve tried, but without success. In other words; when clicking on the removal link, the refresh should happen in the background
How to append meta data to a third party coupon, dynamically?
I need to add a meta_data field to a coupon of a third party plugin, dynamically when it’s loaded. WooCommerce uses the filter woocommerce_get_shop_coupon_data so another plugin can react to it. In class-wc-cart.php the coupon is returned like this: $code is the coupon code as string. So in class-wc-coupon.php (WC_Coupon class) it will apply the filter woocommerce_get_shop_coupon_data and set the
Show/hide custom field based on a select field with validation in WooCommerce checkout
I have added a custom select field and a custom text field on the checkout page in WooCommerce using the code below. I want to hide this text field by default and it should only be visible when the “Referral Program” option is selected from the select field Here is my code, which works. Except that the textfield is always
WooCommerce cart items price suffix for specific product category
I need to add a suffix text to the price of a woocommerce product from a specific category while on WooCommerce cart. Here is my code: The problem is it only works on simple products. Doesn’t seem to affect the prices of variable products (I tested on 3 different sites). Any idea what I’m missing? Answer To make it work
Change “add to cart” button text for products that have “no price” and “out of stock”
I want to change the “add to cart” text button for products that meet the following conditions: empty price out of stock The intention is to change the text to “Not available right now” Here is an example image to clarify my question This is the code that I use. But I can’t make it work. Any ideas of where
Add Facebook Pixel Purchase Event Code to WooCommerce purchase completion page
I need to add the following to the purchase completion page in WooCommerce: Copy the event code snippet. You can add parameters to send additional on-page data. fbq(‘track’, ‘Purchase’); I tried adding the following code to the child theme functions.php file: Fatal error. I’m sure I’m messing something up but I’m a little lost. I tried quite a bit of