Product Icon

Afterpay

Afterpay allows customers to purchase products and choose to pay in four installments over six weeks or pay monthly (US only).

PHP Notice warning errors in logs from plugin

Hey guys,

The following PHP notice keeps getting output with your plugin:
PHP Notice: Undefined index: product-pages-placement-attributes in …/afterpay-gateway-for-woocommerce/class/WC_Gateway_Afterpay.php on line 1953

This is due to not having a fallback on a potentially empty index. You can fix this by specifying a fallback value, such as changing the line in question to something like (replacing ” with an appropriate value):
$input = $this->settings[$context.’-placement-attributes’] ?? ”;

Would be great to get this one fixed as it’s filling up my debug log making it hard to troubleshoot other issues.

Thanks!

Author

assemblodev

Current Status

Open

Last updated: December 18, 2022

0 comments

Log in to comment on this feature request.