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.
0
votes
Accepted
Set a custom field to all orders
You can achieve this via the save_post hook as per the following example:
function wpse_374688_save_post( $post_id, $post, $update ) {
// only update orders (post_type=shop_order)
if ( 'shop_o …
0
votes
Woocommerce hidding pages
This will get you started on the right track.
Call wp_get_current_user() whose return value will be either one of a WP_User object or null value. Assuming we have a WP_User object, we can inspect the …
1
vote
Accepted
Woocommerce - Show random product thumbnail from specific product category
Add a tax_query to your $args...
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'field' => 'slug', //possible values are term_id, name, …
10
votes
Accepted
WooCommerce - Hook after Loading Variation in Admin Edit page?
In woocommerce/includes/class-wc-ajax.php there is a method on the WC_AJAX class responsible for loading variations called load_variations, it contains only one hook, which is a filter, named woocomme …
1
vote
Remove all Span Tags and class From Woocommerce Price
There's a few ways to do this, here are two:
Method #1
In your theme (parent or child if you are using a child theme to extend the parent) create a folder structure as follows:
{your_theme_folder}
…
1
vote
How to display a table below each product in product list/loop
The shop archive or in general any product-loop that passes through:
woocommerce/templates/archive-product.php
...or utilizes similar logic found in that template, by calling:
wc_get_template_part …
9
votes
Accepted
Declaring custom woocommerce product type as virtual / downloadable only
Looking further into the WooCommerce source, they fortunately, provide a filter named woocommerce_product_data_tabs which will allow you to conditional unset tabs.
I've provided an example below:
ad …
2
votes
Accepted
Translating add to cart woocommerce button
What is the content contained within your add-to-cart.php file template override?
It should be similar to this:
global $product;
echo apply_filters( 'woocommerce_loop_add_to_cart_link',
sprintf …
1
vote
Accepted
Woo create order only after payment done
I would normally make this a comment but I believe it warrants an answer.
You should not circumvent the order process of WooCommerce because the order itself represent the state of the order and its …
4
votes
Accepted
Filter available WooCommerce payment gateways by role
Arrrrg a WooCommerce question... quick burn him at the stake!
There's a couple of problems with your callback function above:
you are not declaring global $woocommerce so you do not have access to th …
1
vote
How does Wordpress redirect to WooCommerce shop page?
You could add a rewrite rule to improve the appearance of the URL while maintaining the same functionality:
As an example:
add_action('init', 'custom_shop_param');
function custom_shop_param() {
…
3
votes
Accepted
WooCommerce conditional meta query
The default relation for a meta query is AND, so when you have two conditions they will be treated as such:
$meta_query[] = array(
'key' => '_stock',
'value' => '0.000000',
'com …
1
vote
display woocommerce all category title on home page
<?php
$post_type = 'product';
$taxonomies = get_object_taxonomies((object) array( 'post_type' => $post_type ));
foreach ($taxonomies as $taxonomy) :
$terms = get_terms($taxonomy);
foreac …
2
votes
Editing Header Titles of each details in woocommerce Order Email
To change the heading that appears in the body (message) of the email template you can use the following filter: 'woocommerce_email_heading_' . $this->id where $this->id equates to the id class proper …