PluginProbe
WooCommerce / 11.1.0-rc.2
WooCommerce v11.1.0-rc.2
11.1.0 11.1.0-rc.2 11.1.0-rc.1 11.1.0-beta.2 11.1.0-beta.1 11.0.1 11.0.0 11.0.0-rc.3 11.0.0-rc.2 11.0.0-rc.1 11.0.0-beta.2 11.0.0-beta.1 10.9.4 10.9.3 10.9.2 10.9.1 10.9.0 10.9.0-rc.1 10.9.0-beta.2 10.9.0-beta.1 10.8.1 10.8.0 10.8.0-rc.1 10.8.0-beta.2 10.8.0-beta.1 All 648 releases
woocommerce / src / Internal / Admin / Survey.php
Survey.php
39 lines 768 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Survey helper methods.
4 */
5
6 namespace Automattic\WooCommerce\Internal\Admin;
7
8 defined( 'ABSPATH' ) || exit;
9
10 /**
11 * Survey Class.
12 */
13 class Survey {
14 /**
15 * Survey URL.
16 */
17 const SURVEY_URL = 'https://automattic.survey.fm';
18
19 /**
20 * Get a survey's URL from a path.
21 *
22 * @param string $path Path of the survey.
23 * @param array $query Query arguments as key value pairs.
24 * @return string Full URL to survey.
25 */
26 public static function get_url( $path, $query = array() ) {
27 $url = self::SURVEY_URL . $path;
28
29 $query_args = apply_filters( 'woocommerce_admin_survey_query', $query );
30
31 if ( ! empty( $query_args ) ) {
32 $query_string = http_build_query( $query_args );
33 $url = $url . '?' . $query_string;
34 }
35
36 return $url;
37 }
38 }
39