woocommerce | source ecommerce platform built on WordPress | Ecommerce library
kandi X-RAY | woocommerce Summary
kandi X-RAY | woocommerce Summary
If you have a patch or have stumbled upon an issue with WooCommerce core, you can contribute this back to the code. Please read our contributor guidelines for more information how you can do this.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Query the report data .
- Prepare a product object for saving .
- Save product meta data .
- Render the helper output .
- Get sales report .
- Set product meta data .
- Get order report data .
- Adds a product to the cart .
- Register taxonomies .
- Get the database schema .
woocommerce Key Features
woocommerce Examples and Code Snippets
Community Discussions
Trending Discussions on woocommerce
QUESTION
We have a lot of returning customers so I'm trying to display user lifetime value (LTV - SUM of all past orders) on WooCommerce admin orders list to quickly identifiy best users.
But I don't even know if that is possible. I have a custom column to see if it's returning buyers or not, but don't have idea where to start for LTV.
My code for marking returned buyers:
...ANSWER
Answered 2022-Feb-19 at 08:01You can use the get_total_spent() function, which return how much money a customer has spent
So you get:
QUESTION
I am using the woocommerce products shortcode to show some related products on a product page.
The product shortcode is as follows:
...ANSWER
Answered 2022-Feb-05 at 21:07You would need to use the 'post__not_in'
argument of the WP_Query
.
So your code would be something like this:
QUESTION
I want to add a custom column, to display the product categories on the orders history table in wooCommerce
I found how to add a custom column but I can't seem to display the taxonomy's product linked to the order in this column.
For this example, I had just 1 product, but if I can display more than one tax, it will be better.
This is what I found (from : skyverge blog) to add a new column:
...ANSWER
Answered 2022-Jan-31 at 14:38With your current code you can add a column between the existing columns, however:
- The
woocommerce_my_account_my_orders_columns
filter is deprecated since WooCommerce 2.6.0. and replaced withwoocommerce_account_orders_columns
- The part to add content in the column is missing
To add content you can use the woocommerce_my_account_my_orders_column_{$column_id}
hook,
where $column_id
need to be replaced by order-category
in this particular case
So you get:
QUESTION
I am struggeling by changing the currency symbol in WooCommerce email notifications.
Everywhere you can see the € currency, but as far as you open the emails, you find, that the currency there is £.
I tried to add this function using Snipets:
...ANSWER
Answered 2022-Jan-16 at 11:03This should fix the issue:
QUESTION
So I'm trying to use a single sheet as a price db to update prices in WooCommerce through the Woo API, using fetch. It works, my problem is that it apparently works depending on the size of the dataset? I'm not sure because I can't understand the error.
UPDATED CODE
...ANSWER
Answered 2022-Jan-13 at 02:14- In your situation, it seems that the values of
sku
ofcontainer
is not existing in the values ofsku
ofdata_obj
. I thought that the reason for your issue might be due to this. - As a script for checking this, you can use
const res = container.filter(e => !data_obj[e.sku])
for your script. In this case,[ { sku: 'L4943-0ULT', id: 3195, price: '5083.33' } ]
is returned. When this value is searched from your sample Spreadsheet,l4943-0ult
is found. In this case, the character case is different. By this, your issue occurs. I resulted in the reason of your issue is due to this.
When this issue was removed, how about the following modification?
From:QUESTION
I will like to display a message on the checkout page notifying the customers that they have purchased this product in the past (the product they are about to purchase), but this message should only run if these conditions are met.
- Customer must be logged in
- User role is administrator or customer
- previously purchased product should still have order status of 'processing.'
So far, I have been able to get the first 2 conditions working fine:
...ANSWER
Answered 2022-Jan-03 at 10:36according to this article:
you can implement such a login as below :
QUESTION
I want to display the value of a certain WooCommerce product custom attribute in a Golang template.
...ANSWER
Answered 2021-Dec-27 at 22:27There is no simple way to do this with templates. You have to first find the entry you need, and then look at its contents
QUESTION
I have created a custom product data tab in WooCommere using:
...ANSWER
Answered 2021-Dec-19 at 17:15html-product-data-panel.php is not a template file. So NEVER EDIT PLUGIN FILES! When WooCommerce gets updated, it overwrites the installation with any new updates included in the release. If the core has been chopped up and modified beforehand, it’ll wipe out those changes.
That means big sections of the installation will just stop working. Modifying the core can have all kinds of unintended consequences, like preventing updates from working correctly, further screwing up an installation.
Even worse is the potential to introduce unintended security vulnerabilities. Messing with core files could easily introduce a hole allowing hackers to take over a site.
The icon is assigned via CSS:
QUESTION
It's the continue of my previous question
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 my-account page for not logged users. I use that code to make redirect from my-account page itself, and to exclude 'lost-password' from that rule, to make possible for non-logged users to renew their passwords.
...ANSWER
Answered 2021-Dec-17 at 16:12You've got those redirect rules mixed up! Try the following snippet:
QUESTION
I'm currently trying to extend the WooCommerce product search so that the search uses my custom field I've created within the general product data section:
...ANSWER
Answered 2021-Dec-17 at 08:36I think I have found a way after some testing. First, I've debugged the WC function where the action gets applied, but changed my approach since I was making no progress. I've now extended the post search via the given WordPress filter:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
Install woocommerce
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page