Warning: date_format() in admin and front
-
There is a problem with the plugin in two files:
In the administration part of the online store, in the detail of the order that has been refunded the following error appears:
Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in /home/customer/www/preneostrong.sum.es/public_html/wp-content/plugins/woo-refund-and-exchange-lite/admin/partials/mwb-rnx-lite-return-product-meta.php on line 38On the customer side, in the detail of the order that has been refunded the following error appears:
Warning: date_format() expects parameter 1 to be DateTimeInterface, bool given in /home/customer/www/preneostrong.sum.es/public_html/wp-content/plugins/woo-refund-and-exchange-lite/public/class-woocommerce_refund_and_exchange_lite-public.php on line 792It seems to receive a boolean instead of a DateTimeInterface, the line of code that gives the error is the same in both files:
if ( isset( $return_datas ) && ! empty( $return_datas ) ) { foreach ( $return_datas as $key => $return_data ) { $date = date_create( $key ); $date_format = get_option( 'date_format' ); $date = date_format( $date, $date_format );
The line $date = date_format( $date, $date_format ); produces the above warning.
Can you help me to fix this bug?
Thank you very much!
- The topic ‘Warning: date_format() in admin and front’ is closed to new replies.