wp_remote_post runs 3 times with plugin
-
I’m having an issue where wp_remote_post runs 3 times but is in the code once. I added the code to the “Posts” tab in the “Before the post content”.
Here is part of the code:
<?php $postID = get_the_ID(); $array_with_parameters->blog_id = $postID; $args = array( 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ) , 'body' => json_encode($array_with_parameters) , 'method' => 'POST', 'data_format' => 'body' ); $url = 'https://apiendpointgoeshere.com'; $response = wp_remote_post($url, $args);
Can the plugin prevent wp_remote_post from running 3 times? I tried echo to show output but the output shows up once.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wp_remote_post runs 3 times with plugin’ is closed to new replies.