Questions tagged [price]

Usually an amount of currency paid in exchange for a product or service. An implicit or explicit agreement on the used currency is needed for an unambiguous price specification. Sometimes "the price to pay" is meant metaphorically.
In programming context, the price for a change to a program refers to an increased amount of memory consumption, execution duration, latency, worst case behaviour or any other undesirable attribute of the program afterwards.

Note, when handling currency values in a program it is usually the best method to store prices in integer typed variables, counting the smallest denominations. I.e. storing the integer value 323 (implicit euro cents) in an integer is more reliable than storing the floating point value of 3.23 €.

907 questions
23
votes
1 answer

Change product prices via a hook in WooCommerce 3+

IN WooCommerce, I need to multiply all product prices by a number. So I have used the following (via a plugin): add_filter('woocommerce_get_regular_price', array( $this, 'my_custom_price'), 99); add_filter('woocommerce_get_price', array( $this,…
KronosL
  • 299
  • 3
  • 4
  • 11
16
votes
1 answer

Display the discounted price and percentage on Woocommerce products

On the image below, it shows the discounted price and percentage I found no custom code searching that has this feature. I am using the code below to display the discounted price, but the price is not formatted (the currency symbol and the decimals…
Duc Phuli
  • 219
  • 1
  • 3
  • 13
13
votes
4 answers

Product Final Price after Many Discount given

I have two tables. One table of Ids and their prices, and second table of discounts per Id. In the table of discounts an Id can has many Discounts, and I need to know the final price of an Id. What is the Best way to query it (in one query) ? The…
erezlale
  • 625
  • 2
  • 6
  • 17
13
votes
4 answers

Azure Functions pricing and timeout

I've just noticed recently, that Azure functions acquired a 5 min timeout on the dynamic pricing tier somewhere along the timeline. As I've been busy doing other things, this flew under my radar, until I noticed some long running functions not…
JasonX
  • 503
  • 7
  • 21
12
votes
3 answers

Set product sale price programmatically in WooCommerce 3

I have a Woocommerce store set up with various product categories. I want to apply a 20% discount to all products, which belong to the product category Cuckoo For now all I'm trying to achieve is set a sale price in my functions.php It tried as…
Marcus Christiansen
  • 3,017
  • 7
  • 49
  • 86
12
votes
4 answers

Display Woocommerce product price with and without tax and tax amount

I am using WooCommerce for WordPress and I'm listing items excluding Tax. I need to show separately the Price (without tax), the Tax and the PRICE + Tax on the product page (like in checkout page). I have not been able to find a plugin that does…
Nuri Akman
  • 792
  • 3
  • 18
  • 41
10
votes
1 answer

What is the meaning of the priceRange property in Schema.org?

What does the property priceRange mean in Schema.org? https://schema.org/priceRange I don't understand what is mean that, I live in Kazakhstan, maybe my culture or language does not give clear. Can you give me example for Kazakhstan country, where…
GoldenScrew
  • 181
  • 2
  • 3
  • 14
9
votes
1 answer

What are `lookup_keys` in Stripe?

The Stripe docs for "List all prices" mention a lookup_keys parameter. What kind of values does it expect? I've tried passing a product ID, a plan/price ID, keywords... (test or dev.) But only end up with an empty array for the data property…
Fabien Snauwaert
  • 4,995
  • 5
  • 52
  • 70
9
votes
2 answers

How to reduce Azure Application Insight cost

Is there any way/trick/workaround to reduce Azure Application Insight cost? I have a very large volume of data (around 20M) ingestion every day. Data sampling set 5%, Even after Daily 5GB of data ingestion in Application Insights. Application…
Pankaj Rawat
  • 4,037
  • 6
  • 41
  • 73
9
votes
1 answer

Display the product price in a WP_Query loop in Woocommerce

I have this code to display products from a category and I would like to also display it's price. Any ideas what I could add or change? The code below doesn't display anything (no errors either).
aMJay
  • 2,215
  • 6
  • 22
  • 34
9
votes
2 answers

Replace the Variable Price range by the chosen variation price in WooCommerce 4+

On our woocommerce website I am trying to update the displayed price based on the variations the customer selects from dropdown menus as shown here: I used a php function that had been submitted in another answer by LoictheAztec:…
Peter Doro
  • 95
  • 1
  • 1
  • 5
8
votes
1 answer

firestore read count with where condition -indexed

firestore documentation pricing didn't mention the read on indexed data with where conditions.. if we have a collection (invoice) with 100K docs with fields like (date, number,amount) and i did a query get().where('date' , '==', 20180404') is this…
Mohammad Shraim
  • 1,173
  • 12
  • 21
7
votes
1 answer

Get the regular price of variable product in Woocommerce

I found a lot of answers, but none works for a variable products. I would like to display both, sales price and regular price for variable products. global $product; if( $product->is_on_sale() ) { $sale_price =…
maariaa
  • 149
  • 1
  • 2
  • 10
6
votes
2 answers

Display the Sale price before Regular price in WooCommerce

I am a new member and is weak in programer. I want display Sale price before Regular price (as images attach). I determined the hook here is woocommerce_before_variations_form. Here is the code to edit in the hook. // define the…
donald.sys
  • 301
  • 2
  • 14
6
votes
1 answer

Cart item price calculation, based on chosen "days" custom field in Woocommerce

In Woocommerce, I use custom fields to calculate the price of a product, based on this thread code: Display product custom fields as order items in Woocommerce 3. // Add a custom field before single add to…
Dmitry
  • 119
  • 1
  • 9
  • 38
1
2 3
60 61