Automattic\WooCommerce\Admin\DateTimeProvider

CurrentDateTimeProvider{}WC 1.0

Current DateTime Provider.

Uses the current DateTime.

Хуков нет.

Использование

$CurrentDateTimeProvider = new CurrentDateTimeProvider();
// use class methods

Методы

  1. public get_now()

Код CurrentDateTimeProvider{} WC 6.4.1

class CurrentDateTimeProvider implements DateTimeProviderInterface {
	/**
	 * Returns the current DateTime.
	 *
	 * @return DateTime
	 */
	public function get_now() {
		return new \DateTime();
	}
}