WC_Data_Store_WP::string_to_timestamp()
Converts a WP post date string into a timestamp.
Method of the class: WC_Data_Store_WP{}
No Hooks.
Return
Int|null
. The date string converted to a timestamp or null.
Usage
// 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.
Changelog
Since 4.8.0 | Introduced. |
WC_Data_Store_WP::string_to_timestamp() WC Data Store WP::string to timestamp code WC 9.4.2
protected function string_to_timestamp( $time_string ) { return '0000-00-00 00:00:00' !== $time_string ? wc_string_to_timestamp( $time_string ) : null; }