Custom plugin contact form connecting to mailchimp API

Change your code like this // Enter here the MailChimp API key $apiKey = “”; // Enter here Mailchimp list id $list_id = “”; $server = explode( ‘-‘, $apiKey ); $url=”https://” . $server[1] . ‘.api.mailchimp.com/3.0/lists/’ . $list_id . ‘/members/’; $response = wp_remote_post( $url, [ ‘method’ => ‘POST’, ‘data_format’ => ‘body’, ‘timeout’ => 45, ‘headers’ => … Read more

How can I send api calls from my plugin?

You can check this: $api_endpoint=”https://url_to_API”; $api_args = array( ‘method’ => ‘GET’, ‘headers’ => array( ‘Accept’ => ‘application/json’, ‘any’ => ‘other’ ) ); $queries = array( ‘your_query’ => 1, ‘another_query’ => 5, ); $api_endpoint = add_query_arg( $queries, $api_endpoint ); $response = wp_remote_request( $api_endpoint, $api_args ); $response_code = wp_remote_retrieve_response_code( $response ) $data = json_decode( wp_remote_retrieve_body( $response ), … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)