我使用了错误的方法wp\\u remote\\u post()将起作用。
以下是修复代码:
$args = array(
\'method\' => \'POST\',
\'timeout\' => 45,
\'redirection\' => 5,
\'httpversion\' => \'1.0\',
\'body\' => array(
\'store_name\' => $stidStore_name,
\'customer_name\' =>$stidCustomer_name,
\'payment_type\'=> $stidPaymen_type,
\'amount\'=> $stidAmount,
\'customer_address\'=> $stidCustomer_country,
),
);
$request = wp_remote_post( $stidUrl, $args);
$response = wp_remote_retrieve_body( $request );
$response = json_decode($response);