automatewoo/includes/Variables/Shop/ShopUrl.php
fei-source 47d3c9a8b6 Update to v6.2.2
Source: GrootMade/Festinger Vault
2026-03-15 08:31:15 +08:00

35 lines
725 B
PHP

<?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' );
}
}