Hook-woocommerce Questions
Ad
How to link WooCommerce guest orders to customer account after registration
Our scenario is: the guest user enters the site and places one or more orders without the need to register. and after a while, he decides
How to use woocommerce_trash_{$post_type} action hook
I am trying to read product value when admin click on trash for a product (image attached).
Split discount (coupon) row into multiple deducted cost rows in WooCommerce order totals table
If there are 2 discount coupons used, it shows the sum of 2 coupons in the woocommerce order totals table, while i want to show the deducted cost
Change orders status by order number in Woocommerce
I would like to know if there is a way that i can change status of a bunch of orders with a list of order numbers, exemple : change status of this
WooCommerce Hook ( woocommerce_order_status_changed ) cant run javascript
I tried to run javascript in this hook, but it cant work. i am pretty sure that this hook is triggered as i can perform php insert to the database
get sidebar in a specific page like shop page or about me page or 404 error page or else
how to write code and where (like in page.php or function.php or else )for calling sidebar in a specific page like shop page or about me
sidebar on the shop page is not showing but showing in blog and single product pages only
⦁ problem: the sidebar on the shop page is not showing.
Adding Custom Fields to Woocommerce Custom Taxonomy
I've created a custom taxonomy called "vendors" in woocommerce through this: function vendor_taxonomy() { $labels =
How can I remove short description on the shop page in Woocommerce
Shortly, i want to just remove the short description on the shop/archive page. i added two images. it will be helpful for your understanding. i
How to add a percentage based surcharge (plus tax of surcharge) to all transactions
I'm trying to add a percentage based fee from woocommerce subtotal in both cart and checkout. however, have this fee made up with a 5% surcharge
Ad
Woocommerce get attribute custom field in wc attribute labels function
Add_filter('woocommerce_attribute_label', 'custom_attribute_label', 10, 3); function custom_attribute_label($label, $name, $product) {
WooCommerce show content after variation labels
I want to add content after variation name. i find this hook and saw it's working before, but no on my test it's not :( i want to
Get Woocommerce customer orders
Is is possible to get current and previous customer order? namely i need billing address of current order and billing address of previous order
Apply discount/coupon ONLY for backordered products
I'm trying to add a discount code just for backordered items, i found this one on here and it works for all items, not just backordered items, how
Remove other products if certain product category is present on WooCommerce checkout
I am creating a landing page for the customers and with a specific products that has a category of landing-page. i want the
Adding a custom email order recipient for specific product attributes in WooCommerce?
This is my first question here, and i need your help. i tried researching this topic, but did not manage to understand what exactly i am doing
How to display all validation error of regsitartion page at once in woocommerce
I have customized new user registration form using child theme concept. for this i override the form-login.php file.
Uncaught ArgumentCountError: Too few arguments to function order_completed(). on woocommerce_order_status_completed hook
I am getting the below error: [30-nov-2021 16:08:47 utc] php fatal error: uncaught argumentcounterror: too few arguments to
How to remove "Paypal payments" tab from My Account in Woocommerce
The woocommerce paypal payments plugin adds a
Woocommerce how to exclude the child pages (endpoints) of myaccount from the template redirect hook?
The login-register form has to be shown only like popup, so i've made redirect, to avoid default myaccount page for not logged users.
Add the order ID to the order item metadata before the order is saved and WooCommerce email notifications are sent
I need to add a link with the order id and a password to the order item metadata. currently, i am adding successfully other info to the
Ad
How to get order_meta details from a select field in customer email and orders?
Good to know: i have created additional fields based on the quantity of the product. so if someone purchases the product twice, he has to fill in
How to append a custom meta field as a shortcode argument value in WooCommerce
I have created a custom checkbox field _is_group and i would like to be able to use this in the [products...]
Need to change price against individual quantity of the product in woocommerce
I'm stuck, don't know how we can change price against individual price in woocommerce. currently, cart object provide us a single object
Trying to move the coupon form after "woocommerce_review_order_before_payment"
I have tried to move the coupon code to the bottom of the checkout page at hook "woocommerce_review_order_before_payment"
Change WooCommerce coupon label for different coupon names in cart totals
I need to change the default coupon label that woocommerce is adding to the cart and checkout table. this can be done with:
Require simple products in WooCommerce cart for product variations before checkout
After adding some product variations to the cart, some simple products are required to match the product variations in cart. if there are
How to change product Image when variables are selected in Shop and Archive Pages?
I use this hook to show variations on the shop page. however, the product image does not change when a variable is selected. it works on a single
Add message based on shipping method ID in WooCommerce customer completed order email notification
I want to add a message based on the shipping method id in the woocommerce customer completed order email notification. i am using
Woocommerce checkout breadcrumbs
I am using woocommerce with flatsome theme. my website is in spanish, and i am quite happy with how its translated automatically, but i have one
WooCommerce how to hide "Description" tab if product description is empty
I want to hide the "description" heading of the woocommerce product whenever the product's long description field is empty.
onclick Modal box in single product page
I want to create a onclick modal in single product page. i have put together the following: files
Ad
Woocommerce admin_notices does not work when woocommerce_order_status_changed hook fires
I'm new to wordpress development and i'm currently encountering a dead-end. i want an admin notice to be displayed in a woocommerce order
Issue when using "woocommerce_product_get_stock_quantity" filter hook
I want to replace the stock quantity on the single product page with "5+", if the stock quantity is more than 5, else display the
How to change order/location of HTML form elements in registration page of woocommerce
I added custom/extra user details in registration form of woocommerce (image attached
How to add a custom shortcode below the product table on woocommerce checkout page
Problem: i need to add a shortcode [wc_sc_available_coupons] below the product table on the checkout page. i
Checkout payment hook in WooCommerce
I want to add a markup, <h3>payment</h3>, above the payment methods section in the checkout page. i tried
Add custom WooCommerce registration fields to admin WordPress user contact fields
I customized the user registration process of woocommerce for this i added some extra fields like date of birth & mobile
Woocommerce: How to redirect to a new page from 'process_payment' function?
I'm trying to build a custom payment gateway on woocommerce. and i'm trying to redirect to a new page for payment page from process_payment.
How to Display custom user registration details in Account Details page in woocommerce
I added custom/extra user details in registration form of woocommerce (image attached -
Woocommerce meta query not works in product_query
I want to change products in woocommerce product page loop with filter i'm try filter from url
Loop function not running after WooCommerce cart page update
I'm trying to run a simple loop on the woocommerce cart page. when the page initially loads, the function does it's thing, but on update of the
Set "free shipping" method as selected default shipping option in WooCommerce
I'm struggling with changing the shipping option selected default. the 'free shipping' shipping option only shows up if the customer has the
Ad
Do an action when woocomerce saves a product
I need to save some options when a woocommerce product gets saved. is there any way to do it?
Add php code after product price on shop and archive pages
Link attached image i am trying to add code php
How to refresh cart and checkout in every 5 seconds in WooCommerce?
I am working on wordpress / woocommerce my requirement is when the customer is on the cart page, i want to refresh cart
How to display reviews on an under product title in cart of woocommerce?
I am trying to add the number of reviews and the star rating reviews on the product. i want to achieve something like this.
WooCommerce custom order action does not work with trash status
I want to use woocommerce hook woocommerce_order_status_changed. i want to fire something when new status of order is
WooCommerce triggering an action and creating a log file when product is published
In woocommerce, i’m trying to trigger an action when a product is published, but it doesn’t work, here is my code: add_action(
Display product custom field via "woocommerce_email_order_meta" hook in WooCommerce admin email notification
My products have a custom field called depot. i need to display this field only in admin mail notifications, not to the customer
Apply remove_action based on productIDs in WooCommerce
Is it possible to remove a woocommerce hook (in this case product title) based on a certain product id?
Anyway to change the Total title from the WooCommerce order received page's order overview
Is there a hook to change the total title from the woocommerce order received page's order overview? please see the below image to understand
Automatically add product to cart when visiting single product page in WooCommerce
So i need to get the product auto added to cart if the user visits the product page so like this
Ad
Hide orders that contains a specific product in WooCommmerce "My account" orders table
My intention is to hide orders that contains a specific product id (5). this in the woocommmerce "my account" orders table what i
Woocommerce review order total hook is echoing result twice
I want to get the cart total figure for which i am using the following code in my functions.php: function
Extend get_european_union_countries() function in WooCommerce
I'm using a filter that targets the eu countries, which works well. however - i would like to included uk which isn't part of the eu anymore as
Display latest orders on WooCommerce "My account" Dashboard
I'm trying to show customer last 3 orders on woocommerce dashboard. but get_template() does not work at all and shows nothing.
How to find a string in Woocommerce hook 'woocommerce_email_order_details'
I'm trying to find (and to modify) a customized string in transactional emails as the one made with
How to use function and HTML together in functions.php in WordPress
All i have an issue. please help i am fresher i need a guide. i have to use the function to get custom field value and need to set that
How to replace product_name by product_sku on Add to cart message
By default, this message line will be: product product_name has been added to cart i want to
How to set a maximum limit in WooCommerce orders per item & per day
I want to allow only a specific number of orders per product per day on my shop. any idea which hook do i have to add? thanks
Attempting to List Product Categories along with the price range of their products
I'm trying to create a page where i display a list of categories and the price range of the products within those categories. e.g
How to get discount amount to set cart item prices to zero in WooCommerce before calculating totals
I'm using woocommerce_before_calculate_totals for updating product price to 0 (using set_price) and it's works great but
Ad
Updating cart totals after ajax request
Here is my custom ajax request callback. i use some data with wp_remote_post and getting json results about my own woocommerce
remove_action wc_empty_cart_message not working in WooCommerce
I would like to remove completely the wc_empty_cart_message. my site has no cart. and when the item is removed from checkout the user
updating product subtotal in cart contents
I've trying to write my campaign plugin. here is the problem, i want to update, line_subtotal and line_total in a
WooCommerce Checkout Country field to Autofocus its search input once dropdown is selected
I've just started with php and i want to customize a woocommerce checkout field relating to the country dropdown. i have no idea where i have to
what would be the hook called for bulk order status (woocommerce)?
I want to call my custom function on bulk order status changed, to add some additional
Display custom field between billing address in WooCommerce admin order edit pages
I´m currently trying to add a custom field to the default address fields (firstname, lastname, etc...) the field should be used, to set a
Issue when using "woocommerce_product_add_to_cart_text" filter hook
I wrote a function to change add to cart button text for products on backorder. woocommerce_product_single_add_to_cart_text
Several issues when using woocommerce_get_availability hook
Im trying to show an 'out of stock message' on the single product page for products that are out of stock. i have this code in my
How to add a customizable text after WooCommerce add to cart button
I need to add custom text element after the add to cart button in woocommerce. i try with this code, that i insert in
WooCommerce - Display how many people have a product in their cart with conditional message
I'm using the following snippet to display how many people have added a product in their current cart on the shop and single product pages;
Remove "Checkout is not available whilst your cart is empty." notice in WooCommerce
What code should i add to functions.php to remove "checkout is not available whilst your cart is empty." notice in
Ad
Hide payment method if specific variation is in Checkout Page | Woocommerce
I'm using this code on my wordpress website to hide the payment gateway when a particular product variation is selected. however, as soon as i
Woocommerce: Remove the product description depending on specific content
I am looking for a way(hook) to hide a complete product description in woocommerce if it contains a specific text like "no description
Remove a specific item when on the home page
I am no expert in wp and wc hook. i am trying to create a landing page but the rule is when you are on the home page the specific item on the cart
Custom WooCommerce Product Query is not working
I'm trying to create this custom product query, to only display products on the /shop page with the following tax_query.
WooCommerce featured product change hook
I want to hook my custom function whenever any product assigned as featured product or removed from featured product. i have found that
wordpress redirect users to the same URL they request appending parameters according to role
I am working on a wordpress website with multiple roles. my target is to redirect user with a specific role when they request pages like orders in
Set WordPress user email instead of billing email as default value for WooCommerce checkout field
What i am trying to do is change the checkout fields so that if a user is logged in they can't edit their billing email field. this code
Woocommerce : How to add a custom meta_key to checkout billing_phone?
I want to enter the value of digits_phone meta key to be entered as billing_phone for every woocommerce order. i
Remove and replace woocommerce add to cart button
I'm working on a solution where i have a acf on each woocommerce product. when the custom field is other than null it will add a
How to send a woocommerce cart details in ninja form email?
I want to send woocommerce cart details from ninja form plugin is there any hook or any addon for sending a cart details to the user in
Prevent WooCommerce from firing product update webhook on REST API update only
I am trying to create a stock sync system that communicates with woocommerce via rest api and webhooks. it works simply like that: if
Ad
Add dropdown list to woocommerce cart and retrieve value on checkout?
I'd like to modify cart.php to contain a dropdown list of "checkout agents" and then retrieve that data when checking out
Retain Woocommerce Cart Custom Select Field on Quantity Change
I have a custom select tag on the woocommerce cart which is setup as shown below. everything seems to be working except that once
How can I add a default value to custom field in addition information tab woocommerce
I have added a custom field that is getting and displaying the value on the front-end. the issue arises when the field is empty or the value is 0,
WooCommerce Shipping Plugin - Checkout Shipping Cost Not Updating(AJAX)
I've searched to find any solution but nothing worked. here what i want to do: add new
Add a custom column to order items and make it sortable in WooCommerce admin order details page
I have been working to add a item product attribute to the admin order details page - which i have managed. you can see the extra column titled
Move "review tab" to position output of product sharing on WooCommerce single product page
I want to change the position of the "review tab" to the position below the share button on the right i removed the default
add custom order status in Print Invoice & Delivery Notes for WooCommerce plugin
I want to add order status in print page using invoice & delivery notes for woocommerce plugin i tried this code and it didn't work, what is
Remove double quotes from add to cart message in WooCommerce
I am trying to find out how to remove or replace the double quotes from the woocommerce add to cart message. “unf #10 x
Allow order to be fully editable while using a custom order status in WooCommerce
I have a bug with the edit quantity in an order while using a custom status. the edit arrow seems to have disappeared? is there another
Show Woocommerce demo store notice only on tuesdays
I would like to show the woocommerce store notice demo_store only when store is closed. this is every tuesday. i thought about first getting the
Disable WooCommerce new order email notification when shipping method is NOT "Local Pickup"
I am trying to send the woocommerce new order email only when the customers has selected "local pickup" as shipping method. in
Ad
WooCommerce: How to add custom text between variation title (label) and dropdown selector
We would like to add (fixed) custom text in between the title/label of the product variation and the dropdown selector like indicated below.
Show product titles to specific delimiter on WooCommerce category archive pages
My products have titles that include the delimiter | after which i enter some seo keywords. example product title
Ad
Blog Categories
Ad