• Resolved inspired888

    (@inspired888)


    Hi there. Thanks for this handy plug-in. I’m seeing a warning occurring (a lot) in our error logs. As follows:

    AH01071: Got error 'PHP message: PHP Warning: Undefined array key "filter-by-payment" in ***/public_html/wp-content/plugins/payment-method-order-column/era-pmoc.php on line 161'

    Is this something you can fix in a new release please?

    I realise it PHP warnings typically don’t prevent the code from working, but ideally it was be coded in such a way that warnings such as this don’t occur. It makes for large error log files.

    Thank you,

    Jonathan

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author alessio.rosi

    (@alessiorosi)

    Thank you Jonathan, for your feedback!
    We will check this out and fix as soon as possible. It’s just a warning but we will fix it especially for next PHP releases

    Thread Starter inspired888

    (@inspired888)

    Thanks Alessio. Much appreciated.

    Indeed … it’s just a warning. Although I find that most server configs hare logging of PHP warnings on by default, and this filter-by-payment warning creates a lot of noice/bloat in the logs. So would be great to see it gone. As far as I can tell, it’s just a matter of doing a test on the $filter_id (e.g. if ( isset( $_GET[ $filter_id ] ) ) {. Seems to do the trick.

    In the mean time, I’ve written a new plug-in which achieves the same result, but with some changes to the Payment Method column. I prefer to see up front the card number, so I’ve written it to display “Amex 5647” (for example), rather than an icon and then having to hover over; also, it displays an svg Apple icon after those cards processed through Apple Pay, and an svg Google icon for those done on Google Pay). Just some minor adjustments I figured I might as well do along the way.

    Wishing all the best …

    Plugin Author alessio.rosi

    (@alessiorosi)

    The issue is fixed by adding :

        $payment_filter= isset($_GET[$filter_id]) ? sanitize_text_field($_GET[$filter_id]) : '';
    

    In the column is possible to display everything inside the payment method (the simple icon, the cart number, the pay pal transaction id ….)

    Could be nice to set some admin configuration for the plugin to set what to display in the column

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Warning: Undefined array key “filter-by-payment”’ is closed to new replies.