WordPress at Your Fingertips
function is not described

WC_Data_Store_WP::string_to_timestamp() protected WC 4.8.0

Converts a WP post date string into a timestamp.

{} It's a method of the class: WC_Data_Store_WP{}

No Hooks.


Int|null. The date string converted to a timestamp or null.


// protected - for code of main (parent) or child class
$result = $this->string_to_timestamp( $time_string );
$time_string(string) (required)
The WP post date string.


Since 4.8.0 Introduced.

Code of WC_Data_Store_WP::string_to_timestamp() WC 5.6.0

protected function string_to_timestamp( $time_string ) {
	return '0000-00-00 00:00:00' !== $time_string ? wc_string_to_timestamp( $time_string ) : null;