Add custom CSS for plugin admin Page

I guess you’re using this code in a wrong file other than the main plugin file (usually /wp-content/plugins/wp-cricket-info/wp-cricket-info.php). So, the file you’re referencing when enqueueing is actually incorrect.

Follow the steps below-

  1. Define a constant in the main plugin file that references the file itself.

define( 'WP_CRICKET_INFO', __FILE__ );

  1. When enqueueing the CSS, use that constant as the second parameter.

wp_enqueue_style( 'cricket-info-admin-styles', plugins_url( 'assets/css/admin_styles.css', WP_CRICKET_INFO ), false, '1.0.0', 'all' );