Find Jobs
Hire Freelancers

Woocommerce change in stock text and display variation quantity.

$10-30 USD

クローズ
投稿日: 約8年前

$10-30 USD

完了時にお支払い
I have a woo-commerce website and I need a customization to the PHP. I want to change the "In Stock" text on a single product page. I have used this function code: // Change in/out of stock text //@LINK [login to view URL] add_filter( 'woocommerce_get_availability', 'custom_get_availability', 1, 2); function custom_get_availability( $availability, $_product ) { global $product; $stock = $product->get_total_stock(); if ( $_product->is_in_stock() ) $availability['availability'] = __( $stock . ' Needed!', 'woocommerce'); if ( !$_product->is_in_stock() ) $availability['availability'] = __('Need fullfilled! ', 'woocommerce'); return $availability; } This code works to change the text, however it returns the global stock amount on variable products. For instance if I have a product with 4 variations and I have 10 of each variation it displays as 40 needed, rather than 10 needed for variation 1, 10 needed for variation 2 ...etc. I would like the code to display the amount in stock for each variation and my custom text.
プロジェクト ID: 9706787

プロジェクトについて

7個の提案
リモートプロジェクト
アクティブ 8年前

お金を稼ぎたいですか?

Freelancerで入札する利点

予算と期間を設定してください
仕事で報酬を得る
提案をご説明ください
登録して仕事に入札するのは無料です
この仕事に7人のフリーランサーが、平均$43 USDで入札しています
ユーザーアバター
Hello! With 98% to 99% completion rate, 900+ successfully completed projects, and a 4.99 reputation (maximum possible, 5.0) (can be verified on my profile page https://www.freelancer.com/u/rajeshsonisl.html !!)... you can never go wrong choosing me :) I am available to get started on your project right away. I look forward to your reply. Thanks. Kind Regards, Rajesh Soni
$105 USD 1日以内
4.9 (1035 レビュー)
8.9
8.9
ユーザーアバター
I have read your project details, and I am interested in offering my services. I provide 100% satisfaction guaranteed on all my work. Milestone is required to begin; to be released when the job has been satisfactorily completed. ftp details to your server will be required. Contact me at your soonest convenience so we may get your solution delivered quickly. Thanks, coderXO
$60 USD 1日以内
4.9 (758 レビュー)
8.3
8.3
ユーザーアバター
Hello, I have gone through your outsourced requirements "Woocommerce change in stock text and display variation quantity. " and have analyzed that I have right credentials (Skills required PHP, WooCommerce) to execute your esteemed project. I will complete your project asap, LIFETIME error free guarantee and provide 365 days (ONE YEAR) support... ===== Why choose me? ===== 5.0 / 5.0 rating, 100% completion rate, 100% on-time completion, 100% on-budget :) Kindly, check my profile: http://www.freelancer.com/u/BitLabs.html I work smart, hard, and strictly bid only what we can do! No sub-contracting... ever! You will never go wrong choosing me :)
$38 USD 1日以内
5.0 (134 レビュー)
6.8
6.8
ユーザーアバター
Hello! That's easily fixable in virtually no time. Kind Regards, Dobri
$15 USD 0日以内
4.9 (175 レビュー)
6.2
6.2

クライアントについて

UNITED STATESのフラグ
Eagle Point, United States
5.0
60
お支払い方法確認済み
メンバー登録日:8月 2, 2010

クライアント確認

ありがとうございます!無料クレジットを受け取るリンクをメールしました。
メールを送信中に問題が発生しました。もう一度お試しください。
登録ユーザー 投稿された仕事の合計
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
プレビューを読み込み中
位置情報へのアクセスが許可されました。
あなたのログインセッションの有効期限がきれ、ログアウトされました。もう一度ログインしてください。