Tag Info

New answers tagged

0

There are some possibilities in this error. Your woocommerce plugin configuration file is changed or you are using any old wordpress version. Try to re-install woocomerce configuration file into your plugin directory. I hope it resolves your problem. Can you tell me which wordpress version you are using?


-3

SELECT ID, post_title, guid FROM posts WHERE post_type='product' and post_status='publish' and ID IN( SELECT object_id FROM term_relationships WHERE term_taxonomy_id ...


0

Thanks, I use foreach ( $terms as $term ) { $term_link = get_term_link( $term ); echo '<li><a href="' . esc_url( $term_link ) . '">' . $term->name . '</a></li>'; } It works perfectly.


1

Glad you got it to work! Per my comment, WooCommerce takes Post Meta into consideration whenever deciding whether or not to add a Product to the Shop Catalog. It seems you were able to make it show up by updating the product visibility: update_post_meta( $new_product_post_id, '_visibility', 'visible' ); I'm not 100% familiar with WooCommerce so should it ...


1

According to The Codex on wp_set_object_terms() get set by passing in a slug instead of the actual Term Name: wp_set_object_terms( $object_id, $terms, $taxonomy, $append ); $terms (array/int/string) (required) The slug or id of the term (such as category or tag IDs), will replace all existing related terms in this taxonomy. To clear or remove all ...


0

Your theme doesn't necessarily include all these template files. It might just use index.php to serve the single page template as well as listings (category, date, author, tag, etc). The articles Theme Development and Template Hierarchy from the codex should get you on the right road with theme development. If you add a single.php file, WP will use that ...


0

Finally i got the answer i was wrong because i tried to send the variable you can not send the variable you have to just put the name of custom field slug. In the bellow snippet i have replaced $field with my custom field name slug _some_field like:- $keys['How did you learn about us?'] = '_some_field'; /** * Add the field to order emails **/ ...


0

I was trying after posting here too and I got my snippet and here I am also sharing it so you can also get it. I used the code shared at Display WooCommerce Products Categories With Thumbnail & Description. It also shows Title, Link, Product Count In It, Thumbnail, Description and Custom Text so this is my solution. Hope you will find it worthy too.


0

Finally I got the code. Using below code, you can pick your OnSale products that are either Simple Product On Sale or Variable Product On Sale. Keep in mind that this code will pick every post in which you added sale price in the below image mentioned column . So avoid adding the price in this column (Shown in attached Image) if your sale price is same as ...


0

You can use this following query to get the total number of orders. $order_totals = apply_filters( 'woocommerce_reports_sales_overview_order_totals', $wpdb->get_row( " SELECT COUNT(posts.ID) AS total_orders FROM {$wpdb->posts} AS posts LEFT JOIN {$wpdb->postmeta} AS meta ON posts.ID = meta.post_id LEFT JOIN ...



Top 50 recent answers are included