Automattic\WooCommerce\Internal\Admin
Survey::get_url
Get a survey's URL from a path.
Method of the class: Survey{}
Hooks from the method
Returns
String. Full URL to survey.
Usage
$result = Survey::get_url( $path, $query );
- $path(string) (required)
- Path of the survey.
- $query(array)
- Query arguments as key value pairs.
Default:array()
Survey::get_url() Survey::get url code WC 10.7.0
public static function get_url( $path, $query = array() ) {
$url = self::SURVEY_URL . $path;
$query_args = apply_filters( 'woocommerce_admin_survey_query', $query );
if ( ! empty( $query_args ) ) {
$query_string = http_build_query( $query_args );
$url = $url . '?' . $query_string;
}
return $url;
}