• Resolved pgonzalezsum

    (@pgonzalezsum)


    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 38

    On 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 792

    It 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!

    • This topic was modified 3 years, 1 month ago by pgonzalezsum.
    • This topic was modified 3 years, 1 month ago by pgonzalezsum.
    • This topic was modified 3 years, 1 month ago by pgonzalezsum.
    • This topic was modified 3 years, 1 month ago by pgonzalezsum.
    • This topic was modified 3 years, 1 month ago by pgonzalezsum.
    • This topic was modified 3 years, 1 month ago by pgonzalezsum.
Viewing 1 replies (of 1 total)
  • Hello,

    We have checked the plugin on our end and it’s working perfectly fine, could you please check this once by deactivating other third party plugins one by one also with the standard theme once, and if still there is any concern then we need to check the concern directly on your end and for that you can connect with us anytime.

    Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Warning: date_format() in admin and front’ is closed to new replies.