woocommerce

Display last WooCommerce admin order note in customers order history

拈花ヽ惹草 提交于 2021-02-07 19:57:35
问题 I am looking to display the last Order Note, currently only viewable via Admin in Woocommerce, on the customer side in their Order History. So they can view the tracking number we add in after the order is set as complete. https://example.com/my-account/view-order/135/ We add a customer note by first setting the order as COMPLETE via the Woocommerce API then adding an order note with the tracking link. So the tracking ref will always be the last item. How can I show the last Order Note on the

How to use variation and add-to-cart button outside woocommerce loop

孤人 提交于 2021-02-07 19:51:38
问题 I'm using woocommerce for my website, but as I only have one main product and two accessories (related products), I don't need a classic shop page, neither single-product pages for each of my product. My main product has a color variation. I want to have an add-to-cart button, with the color variation dropdown and the quantity field in one of my regular post page. Exactly like on a single-product page, but embedded in my own page, and without the parts of the single-product page I don't need

Add product description to cart items in Woocommerce

 ̄綄美尐妖づ 提交于 2021-02-07 19:42:07
问题 I'm struggling to find a simple solution to this problem I'm having with One-page-checkout plugin for Woocommerce. My client would like to add the product description next to the product title in cart items. Any thoughts on how I can manipulate the code to show the description? This is what I have actually: I would think that this plugin would just be hiding the description somewhere but I can't locate it anywhere in the code. 回答1: There is 2 ways to do it (making work for products and

Variations Javascript not working when single_product_content is loaded via Ajax (WooCommerce)

一曲冷凌霜 提交于 2021-02-07 14:28:38
问题 In my WooCommerce Shop Templates I am loading the single-product-content dynamically in the archive-product.php page with Ajax. This part is working. But the javascript to choose the product variations is missing so I tried to add the script to the html after the successful ajax request. I could load the script but I still can not choose a product variation. No events are triggered. Seems like I am missing something... My Javascript: jQuery('.project-preview').on('click',function(){ var theId

Woo commerce new user email

偶尔善良 提交于 2021-02-07 14:18:25
问题 I wrote a custom plugin that handles login and registration for my WordPress Woocommerce site. When a user registers via my custom form handler I would like to trigger Woocommerce to send the new user an email instead of using wp_mail. This way I reduce code redundancy, and all of the transactional emails can be formatted the same (they all have the same look and feel). Is it possible to do so? 回答1: Try this: $wc = new WC_Emails(); $wc->customer_new_account($user_id); $customerID should be

Display a Sold out greyed button if all variations are out of stock in Woocommerce

China☆狼群 提交于 2021-02-07 11:16:37
问题 I am looking for a solution to a problem I have... I have products in Woocommerce, with variations. If ALL variations are out of stock, I want to change the Add to Cart button text to say "Sold out" and edit the CSS of the button also (change it's color) BEFORE a variation is selected in the dropdown... So here's a scenario: I goto a variable product single page. The product has 4 variations: CURRENTLY: The "add to cart" button displays (greyed out) and can be clicked before a variation is

Display a Sold out greyed button if all variations are out of stock in Woocommerce

北战南征 提交于 2021-02-07 11:16:35
问题 I am looking for a solution to a problem I have... I have products in Woocommerce, with variations. If ALL variations are out of stock, I want to change the Add to Cart button text to say "Sold out" and edit the CSS of the button also (change it's color) BEFORE a variation is selected in the dropdown... So here's a scenario: I goto a variable product single page. The product has 4 variations: CURRENTLY: The "add to cart" button displays (greyed out) and can be clicked before a variation is

Display a Sold out greyed button if all variations are out of stock in Woocommerce

岁酱吖の 提交于 2021-02-07 11:16:03
问题 I am looking for a solution to a problem I have... I have products in Woocommerce, with variations. If ALL variations are out of stock, I want to change the Add to Cart button text to say "Sold out" and edit the CSS of the button also (change it's color) BEFORE a variation is selected in the dropdown... So here's a scenario: I goto a variable product single page. The product has 4 variations: CURRENTLY: The "add to cart" button displays (greyed out) and can be clicked before a variation is

Display a Sold out greyed button if all variations are out of stock in Woocommerce

佐手、 提交于 2021-02-07 11:15:44
问题 I am looking for a solution to a problem I have... I have products in Woocommerce, with variations. If ALL variations are out of stock, I want to change the Add to Cart button text to say "Sold out" and edit the CSS of the button also (change it's color) BEFORE a variation is selected in the dropdown... So here's a scenario: I goto a variable product single page. The product has 4 variations: CURRENTLY: The "add to cart" button displays (greyed out) and can be clicked before a variation is

Activate Woocommerce image gallery features on shop archive page

大兔子大兔子 提交于 2021-02-07 10:52:49
问题 I'm trying to build a Woocommerce shop with all products listed with full product information (excerpts, pictures, title, price, etc.) on the shop archive page. No product detail pages. I have loaded the simple-page content instead of page-content in the loop of my custom archive-product.php in my theme/woocommerce folder. My problem is, that the product image gallery features (zoom, lightbox, slider) don't work on the archive page, only on single-product-page. How can I unlock the gallery