How can I display one product using WooCommerce
WooCommerce product is just a custom post type. You can use get_posts or WP_Query.
WooCommerce product is just a custom post type. You can use get_posts or WP_Query.
This is vague but it seems as though you are getting an ID. You could use wp_get_attachment_image_src() to get the image source
Figured it. woocommerce_thankyou is the hook to be used.
Problem is on cart page has_term is false because it is checking if cart page have terms 12-pack or 6-pack. You also need to provide post object/ID to has_term() as a third parameter. Updated code:- function input_set_all_values( $args, $product ) { if (( has_term(‘6-pack’, ‘criteria’, $product->post ) ) ) { $args[‘step’] = 6; $args[‘min_value’] = … Read more
Googling get_terms gives the WP developer hub page for get_terms as the first result, for which the first example is this: $terms = get_terms( ‘post_tag’, array( ‘hide_empty’ => false, ) ); Using this as a basis we get: $args = array( ‘taxonomy’ => ‘product_cat’, ‘number’ => 5, ‘orderby’ => ‘name’, ‘parent’ => 11, ‘hide_empty’ => … Read more
If I understand your question correctly, you would set a your preferred featured image/thumbnail dimensions either in Settings or, if you have or need a new special image type, by adding it to your functions PHP – something like: add_image_size( ‘product_preview’, 55, 55, true ) ; In order to retroactively crop the old images, pretty … Read more
Solution provided by Randall – http://www.wcvendors.com/help/topic/sort-vendor-by-shop-setting-field/ Overall, here is the concept. I needed a shortcode that would allow me to separate vendors by location. To do this, I required users to select a location during their registration and in their store settings. Then I pulled that meta info into a shortcode which filtered and displayed … Read more
If you mean the Wishlist Page were all the wishlist items of a user are displayed, then actually its a single page so you could use is_page() function and pass the ID / slug of that page and then use it as a conditional tag to execute some code.
You can create a taxonomy-product_cat-bikes.php template inside a woocommerce folder in your theme. For more info here is the github link of the template file. Here are some resources for you: More solutions to fit your needs WooCommerce template docs
We’ve got a solution from plugin’s developers: Add this code to theme’s functions.php file // run a function before export starts, it deletes counter value from DB add_action(‘pmxe_before_export’, ‘wp_all_export_pmxe_before_export’, 10, 1); function wp_all_export_pmxe_before_export($export_id) { delete_option(‘wp_all_export_current_row’); } Add this to All Export plugin’s Edit Export screen under ” Export the value returned by a PHP function” … Read more