<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
<?php
/**
 * Default settings for Point of Sale.
 *
 * @package WooCommerce\Internal\Settings
 */

declare(strict_types=1);

namespace Automattic\WooCommerce\Internal\Settings;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * PointOfSaleDefaultSettings class.
 */
class PointOfSaleDefaultSettings {
	/**
	 * Get default store email.
	 *
	 * @return string
	 */
	public static function get_default_store_email() {
		return get_option( 'admin_email' );
	}

	/**
	 * Get default store name.
	 *
	 * @return string
	 */
	public static function get_default_store_name() {
		return get_bloginfo( 'name' );
	}

	/**
	 * Get default store address.
	 *
	 * @return string
	 */
	public static function get_default_store_address() {
		if ( ! WC() || ! WC()->countries ) {
			return '';
		}

		return wp_specialchars_decode(
			WC()->countries->get_formatted_address(
				array(
					'address_1' => WC()->countries->get_base_address(),
					'address_2' => WC()->countries->get_base_address_2(),
					'city'      => WC()->countries->get_base_city(),
					'state'     => WC()->countries->get_base_state(),
					'postcode'  => WC()->countries->get_base_postcode(),
					'country'   => WC()->countries->get_base_country(),
				),
				"\n"
			)
		);
	}
}
