Woocommerce ( Change Variable Product "Add to cart" button if is on stock or not. )

Befejezett Kiadva: 5 évvel ezelőtt Kiszállításkor fizetve
Befejezett Kiszállításkor fizetve

i have this custom code:

add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {

global $product;

if ( $product->is_type( 'variable' ) ) {

$text = $product->is_purchasable() ? __( 'Ver Artículo', 'woocommerce' ) : __( 'Read more', 'woocommerce' );

}

return $text;

}, 10 );

But i need, the button change the text if the product is out of stock, for single and variable ( all variations ) products.

CSS HTML PHP WooCommerce WordPress

Projektazonosító: #19145217

A projektről

13 ajánlat Távolról teljesíthető projekt Utoljára aktív: 5 évvel ezelőtt

Odaítélve:

nixtech

Hello Sir Can i help you with managing button text? I am willing to start right away. Please check my profile for work and experience. Regards Ashwin

$30 USD 0 napon belül
(236 értékelés)
6.6

13 szabadúszó tett átlagosan 37$ összegű árajánlatot erre a munkára

GetReal

Hi Let me change the button for you, I have vast experience in wordpress/woocommerce ready to start and look forward to work with you..thanks!

$35 USD 0 napon belül
(943 vélemény)
8.1
coolguyinus2004

Individual developer to help you o nthis work. show me website and for in stock what text you need and for out of stock what info you need it show? explain to me and give me access so i can finish it for you.

$20 USD 1 napon belül
(347 vélemény)
7.7
webiglobe

Dear Sir, I am really interested to work on this project . I have very good experience of doing this sort of job, I can start the work at earliest and can assure the best service from my end. I am waiting here to Továbbiak

$35 USD 1 napon belül
(282 vélemény)
7.2
shayona163

hello sir i am expert in wordpress and Woocommerce i am able to do this work you will satisfy with my work i can do this work asap thank you

$25 USD 0 napon belül
(211 vélemény)
6.9
Zahi9

Respected Sir/Ma'am, Good Day! I've carefully read your project description. I am very interested in doing this project. I am a professional web developer and WordPress expert. I will give 100% guaranteed satisfa Továbbiak

$25 USD 0 napon belül
(191 vélemény)
7.0
proy89

Hello, Thanks for posting the project with all the details. I shall make modifications to your woocommerce so that "Add to cart" button changes text based on stock status. Please find me on chat, we can discuss and ge Továbbiak

$30 USD 1 napon belül
(107 vélemény)
6.7
cubecreation

Hello, I have gone through your requirement, I can able to change the button text if the simple product is out of stocks. I am ready to start right away and aiming to finish this task in a couple of hours will tr Továbbiak

$25 USD 1 napon belül
(146 vélemény)
6.8
rishijha07

Hello Greetings of the day! Just gone through your job post and I am familiar with Woocommerce and I can customize "Add to cart" button , if product is out of stock. I would appreciate further discussion over pri Továbbiak

$25 USD 2 napon belül
(16 vélemény)
4.4
souravkhunger

******FIX RIGHT NOW************** HI i can fix the issue within a few hours and will provide you unlimited revisions and full support after work is done i am experienced with this task. thanks sourav

$15 USD 0 napon belül
(11 vélemény)
3.4