当我将Wordpress升级到5.3.2版本时,插件生成的PDF发票上的日期消失了。功能mysql2date()
这使得日期是一个wp函数,并在插件中使用,如下所示:
$dateFacture = mysql2date(\'j F Y\',time() );
Output
WP < 5.3.2 => returns the current date
WP = 5.3.2 => returns NULL
我怎样才能解决这个问题?当我将Wordpress升级到5.3.2版本时,插件生成的PDF发票上的日期消失了。功能mysql2date()
这使得日期是一个wp函数,并在插件中使用,如下所示:
$dateFacture = mysql2date(\'j F Y\',time() );
Output
WP < 5.3.2 => returns the current date
WP = 5.3.2 => returns NULL
我怎样才能解决这个问题?问题来自函数time()
作为paramater,我必须通过以下方式更改代码行:
$today = date("Y-m-d H:i:s");
$dateFacture = mysql2date(\'j F Y\', $today );