دسته‌بندی نشده

Filter to exclude specific products from WooCommerce recent products widget not



Hello, I am currently trying to exclude specific products from the WooCommerce recent products widget. Specifically, I want to prevent products with the custom meta field _age_limit set to “大人向け(ie,Adult)” from being displayed. I added the following code to my functions.php, but it’s not working as expected: add_filter(‘woocommerce_shortcode_products_query’, ‘exclude_adult_products_from_recent_products’, 10, 3);function exclude_adult_products_from_recent_products($query_args, $atts, $loop_name){if( $loop_name …

این خبر را در ارتباط فردا دنبال کنید.

لینک حبر

نوشته های مشابه

دکمه بازگشت به بالا