Home » Categories » WordPress | ||||
حذف قیمت از محصولات ناموجود در ووکامرس |
||||
Article Number: 125 | Rating: Unrated | Last Updated: Sun, Nov 12, 2023 at 7:04 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. | ||||
Sorry, you are not allowed to access this page.
Viewed 263 times since Wed, Dec 1, 2021
Wordpress random 500 internal server error
Viewed 166 times since Tue, Mar 1, 2022
How to Add an Admin User to the WordPress Database via MySQL
Viewed 133 times since Thu, Dec 8, 2022
How to disable auth verification e-mail send from Wordfence
Viewed 318 times since Tue, Jan 18, 2022
How to export a specific page in Elementor?
Viewed 197 times since Sat, Feb 26, 2022
اجرای درخواست stats.wp.com/w.js
Viewed 434 times since Sat, Feb 12, 2022
|