I want to add string array to this function to filter displayed option in drpodown


WordPress wpallimport plugin This filter allows modifying the option shown in the options type dropdown for import

The function is as follow: I want to add $custom_types as string array.

function wpai_custom_types( $custom_types ) {   

   // Modify the custom types to be shown on Step 1.
    $custom_types = array("woocommerce orders" , " posts")
   // Return the updated list. 
   return $custom_types;

}
add_filter( 'pmxi_custom_types', 'wpai_custom_types', 10, 1 );

But it won’t work