Home » Categories » WordPress | ||||
حذف قیمت از محصولات ناموجود در ووکامرس |
||||
Article Number: 125 | Rating: Unrated | Last Updated: Sat, Dec 2, 2023 at 9:24 PM
|
||||
تم کودک خود را در منوی کشویی فعال کنید ( اگر هم تم کودک ایجاد نکرده اید روی همان قالب اصلی را بمانید) و function.php را انتخاب کنید.
add_filter( 'woocommerce_get_price_html', 'woocommerceir_hide_price_if_out_stock_frontend', 9999, 2 ); function woocommerceir_hide_price_if_out_stock_frontend( $price, $product ) { if ( is_admin() ) return $price; // BAIL IF BACKEND if ( ! $product->is_in_stock() ) { $price = apply_filters( 'woocommerce_empty_price_html', 'ناموجود', $product ); } return $price; } |
||||
| ||||
Attachments
![]()
There are no attachments for this article.
| ||||
Comments ![]() There are no comments for this article. Be the first to post a comment. | ||||
Wordpress random 500 internal server error
Viewed 415 times since Tue, Mar 1, 2022
Sorry, you are not allowed to access this page.
Viewed 802 times since Wed, Dec 1, 2021
How to export a specific page in Elementor?
Viewed 480 times since Sat, Feb 26, 2022
How to Disallow File Edits In WordPress - disallow_file_edit
Viewed 81 times since Sun, Jun 1, 2025
How to disable auth verification e-mail send from Wordfence
Viewed 1829 times since Tue, Jan 18, 2022
Link to registration page in Wordpress
Viewed 77 times since Thu, Jun 12, 2025
اجرای درخواست stats.wp.com/w.js
Viewed 936 times since Sat, Feb 12, 2022
How to Add an Admin User to the WordPress Database via MySQL
Viewed 716 times since Thu, Dec 8, 2022
|