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 233 times since Tue, Mar 1, 2022
Sorry, you are not allowed to access this page.
Viewed 332 times since Wed, Dec 1, 2021
How to export a specific page in Elementor?
Viewed 264 times since Sat, Feb 26, 2022
How to Add an Admin User to the WordPress Database via MySQL
Viewed 200 times since Thu, Dec 8, 2022
اجرای درخواست stats.wp.com/w.js
Viewed 622 times since Sat, Feb 12, 2022
How to disable auth verification e-mail send from Wordfence
Viewed 1101 times since Tue, Jan 18, 2022
|