Attribute value in product availability status text [duplicate] - woocommerce

This question already has answers here:
Add to Out-of-stock availability text, an availability date in Woocommerce single products
(1 answer)
Change WooCommerce product availability In stock text by a custom text
(2 answers)
Closed 10 months ago.
I'm using How to add custom stock status to products in WooCommerce 4+ answer code
For now, the text that appears on a single product page is generic: Preorder. Shipping after release.
I wish it was more precise and gave a release date for a specific product: Preorder. Ships after release (date here).
I would like the value of a product attribute named 'release' to be displayed in place of the date.
How can I achieve this?

Related

linking two options filed in gravity form to one another

The issue i am facing is that i want to have two sepreate options field in gravity forms linked to one another. For example if i select option 1 in one filed then the same options get selected in the second field and update the price likewise.
enter image description here
on selecting the addon it updates the price based on number of adults.
i want to do the same with kids but if one select a addon mapped to adults the one mapped to kids should be automatically slected.

Woocommerce: Need to show shipping price and include it in the total [duplicate]

This question already has an answer here:
Get the Cart shipping label and cost in Woocommerce
(1 answer)
Closed 4 years ago.
I've inherited a custom built Woocommerce site and am having to make some upgrades but are getting a little stuck.
I can show the cart total before taxes:
WC()->cart->get_cart_total();
I can show the taxes to be applied:
WC()->cart->get_cart_contents_tax();
And the final with the taxes applied:
WC()->cart->get_cart_subtotal();
But I cannot find anyway to show the flat rate shipping I have and also the cart total with the shipping cost applied.
I only have one shipping item which is active, flat rate, with all continents applied to make it global. I'm logged in with an address registered but it doesn't display it.
I have tried multiple options including...
WC()->cart->calculate_totals();
WC()->cart->calculate_shipping();
$packages = WC()->shipping->get_packages();
...but still no shipping price or cart total with shipping.
To extract shipping cost, I would go like this, using get_cart_shipping_total:
$shipping_cost = WC()->cart->get_cart_shipping_total();
Have a try.

Questionnaire based WooCommerce product filter

I want to make a questionnaire based WooCommerce product filter with the help of gravity form.
What I exactly want - http://www.clinique.com/diagnostics
Hint - https://wisdmlabs.com/blog/how-to-create-a-questionnaire-based-woocommerce-product-filter/
can anyone help me with the coding part ( loop through the answers provided by a shopper and save them in an array and query WooCommerce products which include the attributes selected and list them)?

WooCommerce: Date as attribute term

I'm relatively new to using WooCommerce so all advice would be great.
I've got a number of inclass training course products I'm trying to sell. Each have multiple date offerings.
Is there a way I can set the attribute term to a date value or do I have to manually add every possible date?
Is there another way to solve this problem, I am just ignorant off?
Thank you!
When you add the products and while entering the product data in general tab you will see two fields REGULAR PRICE & SALE PRICE beside the SALE PRICE text box you will see the schedule click on it you will find the DATE fields from Date to Date variations in price you can set it from there. Here I set an Image
Here you will Find the date fields to set

Custom loop for getting products flagged as new

I was looking for a way to build a custom loop to get the products flagged with the "new" label.
I could use the sort from the insert time, but that would always include a certain number of products, my goal here is to get those products that conform to the WooCommerce setting that says the product is considered new for a given number of days.
i have a free plugin - WooCommerce Product Badge, it has your requested feature to display "New" label with certain days defined.

Resources