wpovernight / woocommerce-pdf-invoices-packing-slips

Create, print & automatically email PDF invoices & packing slips for WooCommerce orders.
https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
Other
99 stars 45 forks source link

The `normalize_settings_args()` not returning array settings #823

Closed MohamadNateqi closed 2 weeks ago

MohamadNateqi commented 2 weeks ago

A new condition introduced here to fix displaying the logo. The issue happened when you had already set a logo, but after activating a multilingual plugin, you didn't see the logo.

That fixed the logo issue but introduced another bug. For text input settings, that condition sets the current value of the field to an array (which is an array of values for each language, like array( 'en' => 'something', 'nl' => 'something else'), and the text input needs a string as the current value.

The second bug was fixed here by preventing arrays for the current value, but another bug appeared. Some of the settings are arrays by default, such as the "Attach to" setting, and preventing arrays caused an issues displaying the current value of those settings.