0

When I upgrade Wordpress into 5.3.2 version, a date on a PDF invoice generated by a plugin disapeared. The function mysql2date() which makes the date is a wp function and used in the plugin like this :

$dateFacture = mysql2date('j F Y',time() );

Output

WP < 5.3.2 => returns the current date
WP = 5.3.2 => returns NULL

How can I fix this ?

1 Answer 1

0

The problem came from the function time() as paramater so I had to change the code line by :

$today = date("Y-m-d H:i:s");
$dateFacture = mysql2date('j F Y', $today );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.