add_filter( 'wcml_js_lock_fields_input_names', 'the_callback_function' );
- النوع
- filter
- الفئة
- تحديث المحتوى
- إصدار WooCommerce Multilingual
- 3.8
الوصف
إضافة أو إزالة أسماء إدخال الحقول المخصصة المقفلة في محرر منتجات WooCommerce الأصلي للمنتجات المترجمة.
الوسطاء
هناك معلمة واحدة فقط تُمرَّر إلى هذا المرشِّح:- $names
- (مصفوفة) المصفوفة التي تتضمن أسماء إدخال الحقول المخصصة.
مثال على الاستخدام
مثال
/**
* Add this code to the functions.php file of your theme.
*/
add_filter( 'wcml_js_lock_fields_input_names', 'add_js_lock_fields_input_names' );
function add_js_lock_fields_input_names( $names ){
// Add 2 locked field input names
$names[] = '_base_regular_price';
$names[] = 'bto_style';
return $names;
}
خطاطيف ذات صلة
wcml_after_duplicate_product_post_meta, wcml_update_extra_fields, wcml_js_lock_fields_ids, wcml_js_lock_fields_classes, wcml_before_sync_product, wcml_before_sync_product_data