Skip to content

Commit 74f73a6

Browse files
committed
Allow wp_repost_post args to be filtered with dwnload_api_remote_post_args
1 parent 63d99b4 commit 74f73a6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Edd/AbstractLicenceManager.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,14 @@ private function getCheckLicense(array $api_params): CheckLicense
338338
*/
339339
private function getApiResponse(array $api_params): array
340340
{
341-
$response = wp_remote_post(
342-
esc_url($this->pluginData->getApiUrl()),
343-
[
344-
'timeout' => 15,
345-
'sslverify' => true,
346-
'body' => $api_params,
347-
]
348-
);
341+
$defaults = [
342+
'timeout' => 15,
343+
'sslverify' => true,
344+
'body' => $api_params,
345+
];
346+
$args = (array)apply_filters('dwnload_api_remote_post_args', []);
347+
$args = wp_parse_args($args, $defaults);
348+
$response = wp_remote_post(esc_url($this->pluginData->getApiUrl()), $args);
349349

350350
// Make sure the response came back okay.
351351
$code = wp_remote_retrieve_response_code($response);

0 commit comments

Comments
 (0)