Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
OFF TOPIC. PLEASE CLOSE THIS QUESTION. Questions *specific* for this e-commerce plugin have their own forum at https://wordpress.org/support/plugin/woocommerce. Click the "Learn More" link below for useful links such as Support and Developer Docs.
1
vote
Accepted
WooCommerce add_to_cart
The question: Is there a newer way to add product(s) to the cart?
Well, WC_Cart::add_to_cart() is still the way to do it.
Except (on the front-end), there's no need to reinstantiate the cart cla …
1
vote
Accepted
Can't display product categories on woocommerce getting Invalid taxonomy?
it's was working fine last 2 installation
Those two installation might still be on WordPress prior to version 4.5.0, and according to the reference:
Since 4.5.0, taxonomies should be passed v …
0
votes
Accepted
Merge "description" and "additional informations" product tab
The callback used to render the "Description" tab is woocommerce_product_description_tab(), which simply loads the template file single-product/tabs/description.php. And for the "Additional Informatio …
0
votes
Accepted
merge tabs in woocommerce
the content from additional information is shown above the description
content
Because the following code calls wc_display_product_attributes() which displays the default content for the additi …
0
votes
Accepted
WooCommerce Registration, Sync User, Billing and Shipping info
But, from what I can tell, this is only set to fire when a user
updates their own profile.
Yes, that's correct.
Running it as I created a user account didn't produce the results I
was loo …
6
votes
Accepted
WooCommerce checkout: How can I change $field_container of a checkout field?
The woocommerce_form_field() is a pluggable function, defined as follows:
if ( ! function_exists( 'woocommerce_form_field' ) ) {
/**
* Outputs a checkout/address form field.
*
* @ …
7
votes
Accepted
Display orders instead of woocommerce my account dashboard for logged in users
How to redirect a user to my-account/orders correctly
Try this:
add_action( 'parse_request', 'redirect_to_my_account_orders' );
function redirect_to_my_account_orders( $wp ) {
// All other endpo …
7
votes
Accepted
Get WooCommerce Email Classes in Backend
Like I've pointed in my comment, you can use wc()->mailer()->emails, which would give you a list of all the email class instances. Example:
// Get all the email class instances.
$emails = wc()->maile …
12
votes
Accepted
Add custom field to Woocommerce add new attribute / edit page
Yes, you can add custom fields to WooCommerce (product) attributes, which are WordPress custom taxonomies — e.g. an attribute named Color creates a taxonomy with the slug pa_color.
But because the dat …
4
votes
Accepted
WooCommerce Change Product Global Attribute Value via CRUD for Simple Product
I'm not sure which WooCommerce version you're using, but in the latest version (3.3.5), WC_Product_Attribute doesn't have a set_taxonomy() method. So I changed that to:
$attribute_object->set_id( 1 ) …
2
votes
Accepted
Woocommerce - Override the default templates location under the theme directory
I believe you can use the woocommerce_template_path hook/filter:
// $path defaults to 'woocommerce/' (in your theme folder)
add_filter( 'woocommerce_template_path', function( $path ){
$my_path = …
2
votes
Accepted
Accessing parameters when adding filter
When you call add_filter(), set the fourth parameter to 3 (which is the number of parameters accepted by the callback function which in your case is change_rating_output()), and then change your chang …
1
vote
Accepted
WooCommerce - Create multiple product tags via rest api endpoint
Putting aside whether you're making the API request from and to the same site or not, I assume that the $woocommerce is an instance of Automattic\WooCommerce\Client.
And you can use the batch endpoin …
1
vote
Accepted
Custom rewrite for product variation not working
This works because on this URL, $_REQUEST['attribute_pa_model'] is set, and in this example, the value is iphone-x:
index.php?product=example&attribute_pa_model=iphone-x
But on this URL, $_REQUEST[ …
1
vote
Accepted
get_the_post_thumbnail_url does not return anything if image size is set
The first parameter for get_the_post_thumbnail_url() is the post ID or post object, and not the image size which is actually the second parameter.
So:
// Instead of this:
get_the_post_thumbnail_url( ' …