woocommerce

Customizing loop product image via a hook in Woocommerce

萝らか妹 提交于 2021-02-20 10:11:29
问题 I am customizing woocommerce themes. I stuck on loop product using hook action woocommerce. To call/include the thumbnail image in a loop, we call this hook <?php do_action('woocommerce_before_shop_loop_item_title'); ?> And the thumbnail image appears. I am confused where is the <img src"" .... location? How to edit that code? Thanks 回答1: The hook woocommerce_before_shop_loop_item_title load the image from this function code: if ( ! function_exists( 'woocommerce_template_loop_product

Wordpress and Woocomerce integration with mobile app [closed]

我们两清 提交于 2021-02-20 05:26:44
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 8 days ago . Improve this question My wife has an online store built in Wordpress with Woocomerce. Now we are working on the mobile app in Flutter for people who buy diets in the store. We want to integrate some data from Wordpress/Woocomerce with the mentioned app. We want to give users

Setting limited number of reviews on product page in WooCommerce [closed]

北城以北 提交于 2021-02-20 04:59:07
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . Improve this question Is is it possible to set a limited number of reviews to display on the product page under the review tab? Currently some of my products have 40 reviews and to display them all on a single page takes up too much space. Is there a way to limit the number of reviews to say 3, and

WooCommerce Add to cart redirection to previous URL

自闭症网瘾萝莉.ら 提交于 2021-02-20 04:19:47
问题 At the request of users, I need the add to cart button on the individual product page to redirect users to the previous page after clicking add product to cart. With following code, customer returns to a specific page (in this case the shop page): function my_custom_add_to_cart_redirect( $url ) { $url = get_permalink( 311 ); // URL to redirect to (1 is the page ID here) return $url; } add_filter( 'woocommerce_add_to_cart_redirect', 'my_custom_add_to_cart_redirect' ); with this code the users

Add image caption under image thumbnail in WooCommerce single product page

别说谁变了你拦得住时间么 提交于 2021-02-20 04:09:59
问题 I'm trying to add the image caption under each image thumbnail in WooCommerce single product page. Here you can see where I want the text to be showed (presently "undefined") I want to add the individual caption text (not the product title, the image caption. Each image has a different caption). Is there an easy way to do that? I'm using ToolSet and can add JavaScript snippet if needed. I saw a post that talk about this but can't figure it out where to put that code : Show caption under

Woocommerce - Check if product was created less than 60 days ago

陌路散爱 提交于 2021-02-20 04:08:16
问题 I want to check if a Woocommerce product was created less than 60 days ago. - If true, do something. I am obtaining the date the product was created in backend/admin using the official Woocmmerce function $product->get_date_created . My code partially works, but it seems to be checking if $product->get_date_created literally contains the value 60 instead of perfoming the calculation and minusing 60 days from the current DateTime . I have come to this conclusion because my IF statement runs

Woocommerce - Check if product was created less than 60 days ago

守給你的承諾、 提交于 2021-02-20 04:08:10
问题 I want to check if a Woocommerce product was created less than 60 days ago. - If true, do something. I am obtaining the date the product was created in backend/admin using the official Woocmmerce function $product->get_date_created . My code partially works, but it seems to be checking if $product->get_date_created literally contains the value 60 instead of perfoming the calculation and minusing 60 days from the current DateTime . I have come to this conclusion because my IF statement runs

Woocommerce - Check if product was created less than 60 days ago

强颜欢笑 提交于 2021-02-20 04:06:36
问题 I want to check if a Woocommerce product was created less than 60 days ago. - If true, do something. I am obtaining the date the product was created in backend/admin using the official Woocmmerce function $product->get_date_created . My code partially works, but it seems to be checking if $product->get_date_created literally contains the value 60 instead of perfoming the calculation and minusing 60 days from the current DateTime . I have come to this conclusion because my IF statement runs

Add image caption under image thumbnail in WooCommerce single product page

霸气de小男生 提交于 2021-02-20 04:06:23
问题 I'm trying to add the image caption under each image thumbnail in WooCommerce single product page. Here you can see where I want the text to be showed (presently "undefined") I want to add the individual caption text (not the product title, the image caption. Each image has a different caption). Is there an easy way to do that? I'm using ToolSet and can add JavaScript snippet if needed. I saw a post that talk about this but can't figure it out where to put that code : Show caption under

Add image caption under image thumbnail in WooCommerce single product page

≯℡__Kan透↙ 提交于 2021-02-20 04:06:07
问题 I'm trying to add the image caption under each image thumbnail in WooCommerce single product page. Here you can see where I want the text to be showed (presently "undefined") I want to add the individual caption text (not the product title, the image caption. Each image has a different caption). Is there an easy way to do that? I'm using ToolSet and can add JavaScript snippet if needed. I saw a post that talk about this but can't figure it out where to put that code : Show caption under