| @@ -89,9 +89,9 @@ | ||
| 89 | 89 | * @param string $type api type. |
| 90 | 90 | * @param string $data array. |
| 91 | 91 | * @param string $args array. |
| 92 | 92 | */ |
| 93 | - public static function get_data( $type = '', $data = array(), $args = array() ) { | |
| 93 | + public static function get_data( $type = '', $data = array(), $args = array(), $timeout = 60 ) { | |
| 94 | 94 | $headers = array( 'Content-Type' => 'application/json' ); |
| 95 | 95 | |
| 96 | 96 | if ( empty( $type ) ) { |
| 97 | 97 | return self::wdkit_error_msg( 'Something went wrong.' ); |
| @@ -105,9 +105,9 @@ | ||
| 105 | 105 | |
| 106 | 106 | $response = wp_remote_post( |
| 107 | 107 | self::$url . $type, |
| 108 | 108 | array( |
| 109 | - 'timeout' => 15, | |
| 109 | + 'timeout' => $timeout, | |
| 110 | 110 | 'headers' => $headers, |
| 111 | 111 | 'body' => wp_json_encode( $data ), |
| 112 | 112 | ) |
| 113 | 113 | ); |