setApiKey no longer works? | WordPress.org

[ad_1]

Hello!
I have my own apiKey installed for the user, which used to work and was called via mwai_ai_query, as you show in the documentation, and I am sending an example of your code. However, now $query->setApiKey only throws an error and is no longer in the plugin. Please tell me how can I now install my own ApiKey for a user?

add_filter( ‘mwai_ai_query’, function ( $query ) { $apiKey = get_user_meta( get_current_user_id(), ‘apiKey’, true ); $query->setApiKey( $apiKey ); return $query; }, 10, 2 );

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer