[ \EasyInvoice\Constants\PostTypes::EASY_INVOICE_POST_TYPE, \EasyInvoice\Constants\PostTypes::EASY_INVOICE_QUOTE_POST_TYPE, ], 'post_status' => 'any', 'numberposts' => 1, 'fields' => 'ids', 'suppress_filters' => true, 'no_found_rows' => true, ] ); return ! empty( $found ); } /** * Output the notice. * * @return void */ public static function render() { if ( ! current_user_can( 'manage_options' ) ) { return; } if ( get_option( self::OPTION, '' ) !== 'show' ) { return; } $nonce = wp_create_nonce( self::AJAX_DISMISS ); ?>

__( 'Security check failed', 'easy-invoice' ) ] ); } if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( [ 'message' => __( 'You do not have permission to perform this action', 'easy-invoice' ) ] ); } update_option( self::OPTION, 'dismissed', false ); wp_send_json_success(); } }