1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?php
namespace AutomateWoo\Variables\Shop;
use AutomateWoo\Variable;
if ( ! defined( 'ABSPATH' ) ) { exit; }
/** * This class is used to define the { shop.shop_url } variable. * * @since 5.4.0 */ class ShopUrl extends Variable {
/** * Prepare details of the variable to display to the merchant. */ public function load_admin_details() { $this->description = __( 'Displays the URL to the shop section of your site.', 'automatewoo' ); }
/** * Returns variable value. * * @param array $parameters List of parameters used to build the variable. * * @return string Url to the shop section of the site. */ public function get_value( $parameters ) { return wc_get_page_permalink( 'shop' ); } }
|