paghiper / woocommerce-paghiper

Nosso plug-in emite boletos e PIX automaticamente, mostra código de barras, linha digitável e anexa os boletos nos e-mails de lembrete de pedido.
https://www.paghiper.com/
13 stars 4 forks source link

Fatal error on order creation: TypeError: Cannot access offset of type string on string in wc_paghiper_add_workdays #69

Closed BinaryTimsen closed 1 year ago

BinaryTimsen commented 2 years ago

[Fri Jul 22 14:06:09.682379 2022] [php:warn] [pid 475423] [client 0.0.0.0:21147] PHP Warning: Undefined array key "post_data" in /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php on line 311, referer: https://WEBSITE/shopping-cart/ [Fri Jul 22 14:06:09.682425 2022] [php:warn] [pid 475423] [client 0.0.0.0:21147] PHP Warning: Undefined array key "billing_cnpj" in /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php on line 326, referer: https://WEBSITE/shopping-cart/ [Fri Jul 22 14:06:09.682655 2022] [php:warn] [pid 475423] [client 0.0.0.0:21147] PHP Warning: Undefined array key "post_data" in /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php on line 311, referer: https://WEBSITE/shopping-cart/ [Fri Jul 22 14:06:09.682671 2022] [php:warn] [pid 475423] [client 0.0.0.0:21147] PHP Warning: Undefined array key "billing_cnpj" in /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php on line 326, referer: https://WEBSITE/shopping-cart/ [Fri Jul 22 14:06:13.665143 2022] [php:warn] [pid 475424] [client 0.0.0.0:21219] PHP Warning: Undefined variable $taxid in /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php on line 371, referer: https://WEBSITE/finalize-order [Fri Jul 22 14:06:14.961786 2022] [php:notice] [pid 475424] [client 0.0.0.0:21219] id was called incorrectly. Order properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action('wc_ajax_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WC_Paghiper_Pix_Gateway->process_payment, WC_Paghiper_Base_Gateway->process_payment, WC_Paghiper_Base_Gateway->populate_initial_billet_date, wc_paghiper_add_workdays, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0., referer: https://WEBSITE/finalize-order [Fri Jul 22 14:06:14.961899 2022] [php:error] [pid 475424] [client 0.0.0.0:21219] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/wc-paghiper-functions.php:81\nStack trace:\n#0 /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php(521): wc_paghiper_add_workdays()\n#1 /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php(443): WC_Paghiper_Base_Gateway->populate_initial_billet_date()\n#2 /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-pix-gateway.php(78): WC_Paghiper_Base_Gateway->process_payment()\n#3 /var/www/html/WEBSITE/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(982): WC_Paghiper_Pix_Gateway->process_payment()\n#4 /var/www/html/WEBSITE/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1206): WC_Checkout->process_order_payment()\n#5 /var/www/html/WEBSITE/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(461): WC_Checkout->process_checkout()\n#6 /var/www/html/WEBSITE/wp-includes/class-wp-hook.php(307): WC_AJAX::checkout()\n#7 /var/www/html/WEBSITE/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()\n#8 /var/www/html/WEBSITE/wp-includes/plugin.php(476): WP_Hook->do_action()\n#9 /var/www/html/WEBSITE/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(90): do_action()\n#10 /var/www/html/WEBSITE/wp-includes/class-wp-hook.php(307): WC_AJAX::do_wc_ajax()\n#11 /var/www/html/WEBSITE/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()\n#12 /var/www/html/WEBSITE/wp-includes/plugin.php(476): WP_Hook->do_action()\n#13 /var/www/html/WEBSITE/wp-includes/template-loader.php(13): do_action()\n#14 /var/www/html/WEBSITE/wp-blog-header.php(19): require_once('...')\n#15 /var/www/html/WEBSITE/index.php(17): require('...')\n#16 {main}\n thrown in /var/www/html/WEBSITE/wp-content/plugins/woo-boleto-paghiper/includes/wc-paghiper-functions.php on line 81, referer: https://WEBSITE/finalize-order

Versions: Wordpress: 6.0.1 WooCommerce: 6.7.0 WooCommerce Boleto e PIX PagHiper: 2.1.5 Other plugins on that webshop: ARMember 5.1.1 ARMember - WooCommerce Discount Addon 1.4 Brazilian Market on WooCommerce 3.7.2 Checkout Field Editor for WooCommerce 1.6.1 Claudio Sanches - PagSeguro for WooCommerce 2.14.0 Complianz | GDPR/CCPA Cookie Consent 6.2.4 Duplicate Page 4.4.9 GTranslate 2.9.12 Loco Translate 2.6.2 Melhor Envio 2.11.28 Site Kit by Google 1.79.1 Slider Revolution 6.5.24 UpdraftPlus - Backup/Restore 1.22.14 Woo Donations 2.6 WooCommerce Filter Orders by Coupon Version 1.0.1 Woodmart Core 1.0.34 Wordfence Security 7.5.11 WP File Manager 7.1.6 WP Mail SMTP 3.5.1 WP-Optimize 3.2.6 WPBakery Page Builder 6.9.0 Yoast SEO 19.3 Yoast SEO Premium 18.1

Changing the settings value "Dias corridos para o vencimento" from 2 to 3 makes PIX work again! May has something to do with the workdays and the Sunday in 2 days?

Would be great to get this fixed. Thank you very much!

henriqueccruz commented 1 year ago

@TimDownUnder , verifique se seu problema persiste usando a última update por favor.