price

Add price beside Woocommerce Force Sells

☆樱花仙子☆ 提交于 2019-12-24 02:14:33
问题 Woocommerce Force Sells by default only lists the product titles. I need them to also show the product price in brackets beside each title. You can see it here like in this screenshot: But it should be: Birth Pool Hire Bond ($50.00) Birth Pool Liner ($33.00) Is there a filter I can use so that Force Sells puts the prices beside items? Barring that, how can I alter the Force Sells code so that it also outputs price as well? This is the part of the Force Sells code that outputs the items under

How to show “regular price” instead of a “discounted price” on mini-cart (Woo)

十年热恋 提交于 2019-12-24 01:15:34
问题 I have read like every single topic about woocommerce but cannot find out how to show regular price instead of a discounted price on mini-cart. (Yes, i want to show regular price in mini-cart.php) I think i should modify mini-cart.php: 41 but i dont know how i can show regular price. $product_price = apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); Can someone help me with this one? 回答1: Try this: $product_price = apply

What is the priceRange parameter for Google Structured Data Reviews?

对着背影说爱祢 提交于 2019-12-23 17:39:42
问题 I am trying to determine what are the acceptable values for the priceRange parameter. On Google I see "$$$" and that's it. Can someone explain if I should be using $$$ literally or a decimal amount. 回答1: It seems there is no "standard" for this, and probably is born out of the rating system for Restaurants. It seems the convention is: $ = Inexpensive, usually $10 and under $$ = Moderately expensive, usually between $10-$25 $$$ = Expensive, usually between $25-$45 $$$$ = Very Expensive,

WooCommerce variable products: Display the min price with a custom text for different prices

浪子不回头ぞ 提交于 2019-12-23 04:34:04
问题 I'm setting up a function for Woocommerce that display discount price and the regular price for variable product, this function add a " from to " text before the price range. The "WooCommerce variable products: keep only "min" price with a custom label" answer thread matches the best with what I am looking for and work like a charm! But when all variations in a variable product have the same prices, the " start from " should not be displayed. So I've made a simple try and add below the "if"

Enable sale price for logged users and regular price for unlogged users in Woocommerce

六月ゝ 毕业季﹏ 提交于 2019-12-22 13:57:56
问题 In Woocommerce I have a variable products with many variations and every variation has its own REGULAR price and SALE price. I would like when user: is logged in, the sale price will be the active price is not logged in, the regular price will be the active price. I have added this hooked function in my child theme function.php file: add_filter( 'woocommerce_available_variation', 'my_variation', 10, 3); function my_variation( $data, $product, $variation ) { wc_delete_product_transients(

Add a multilingual text after price in woocommerce_get_price_html hook

心已入冬 提交于 2019-12-22 13:54:04
问题 I am building an WooCommerce website and customizing it, copying and pasting code from internet libraries. I have managed to add "custom price and custom text" in woocommerce product so they can be translated into different languages. Here is the look of the product page: https://www.primacent.de/de/product/woo-album-3-2 Here is my code in functions.php : //New Price add_action('woocommerce_product_options_pricing','custom_unit_price'); function custom_unit_price() { woocommerce_wp_text_input

Adding custom text labels to the product prices depending on their type

若如初见. 提交于 2019-12-22 12:06:05
问题 I have one little problem that I can't solve yet. I have this WooCommerce web site with variable products, and currently prices are shown in this way: $5.50 per dozen – $100.00 per dozen I use this CSS rule that adds "per dozen" after every price, but that dont make sense in the current scenario. .price .amount:after { content: " per dozen"; } I would like to show the prices on this variable products this way: $5.50 per dozen – $100.00 per case (quantity number) Thanks in advance for any help

Custom cart item price based on user input in Woocommerce

依然范特西╮ 提交于 2019-12-22 10:01:59
问题 in our Woocommerce store we have some minimum price for any products . And in every product inner page there is two filed where customer can type width , height of the product . And then they can add this product to cart, then price is changed based on given width and height. For example if the minimum price for a product is 50 . And customer add width =2, height=3 , then the price for this product is going to 50*2*3=300 So to arrange this we add this code to function.php add_filter(

Woocommerce global percentage discount on simple products if customer is logged in

一个人想着一个人 提交于 2019-12-22 09:46:16
问题 I'm looking for advice on what's wrong with the following function. My goal in this example is to apply a 50% off discount to all WooCommerce simple products, as long as the user is logged in. function tier_pricing_logic() { if ( is_user_logged_in() ) { function assign_tier_pricing( $price, $product ) { $price = $price * 0.5; // Set all prices for simple products to 50% off. } return $price; add_filter('woocommerce_product_get_price', 'assign_tier_pricing', 90, 2 ); add_filter('woocommerce

Change price of product in WooCommerce cart and checkout

蓝咒 提交于 2019-12-22 08:16:47
问题 I'm creating a WooCommerce add-on to customize the product, based on selected options by the visitor and custom price is calculated and stored into session table also. I am able to get that value in cart page also. My problem: I would like to change the default price of the product and replace it with new calculated value in the WooCommerce process as cart, checkout, payment, mail notifications, order... Any advice please? Thanks 回答1: Ce right hook to get it working is woocommerce_before