Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'wpas_get_custom_fields', 'wpas_products_dropdown_select2', 10, 1 );
- /**
- * Enable Select2 for the "Products" dropdown
- *
- * @param array $fields Registered custom fields
- * @return array
- */
- function wpas_products_dropdown_select2( $fields ) {
-
- if ( isset( $fields['product'] ) ) {
- $fields['product']['args']['select2'] = true;
- }
-
- return $fields;
-
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement