Title: Requests::set_certificate_path
Published: March 29, 2023
Last modified: November 8, 2023

---

# Requests::set_certificate_path( string|WpOrgRequestsStringable|bool $path )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wporg-requests-requests/set_certificate_path/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/wporg-requests-requests/set_certificate_path/?output_format=md#source)

Set default certificate path.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wporg-requests-requests/set_certificate_path/?output_format=md#parameters)󠁿

 `$path`string|WpOrgRequestsStringable|boolrequired

Certificate path, pointing to a PEM file.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wporg-requests-requests/set_certificate_path/?output_format=md#source)󠁿

    ```php
    public static function set_certificate_path($path) {
    	if (InputValidator::is_string_or_stringable($path) === false && is_bool($path) === false) {
    		throw InvalidArgument::create(1, '$path', 'string|Stringable|bool', gettype($path));
    	}

    	self::$certificate_path = $path;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/requests/src/requests.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/Requests/src/Requests.php#L634)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/Requests/src/Requests.php#L634-L640)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwporg-requests-requests%2Fset_certificate_path%2F)
before being able to contribute a note or feedback.