PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.0
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.0
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
← All changes | includes/Forms/FieldRenderer.php +4 -1 2.2.02.4.0 View file →
@@ -29,8 +29,11 @@
29 29 * @return string Rendered HTML
30 30 */
31 31 public function renderField(array $field, $invoice = null): string {
32 32 $type = $field['type'] ?? 'text';
33 + if ('attachments' === $type) {
34 + return \EasyInvoice\Services\DocumentAttachments::renderField($field, $invoice);
35 + }
33 36
34 37 // Convert field type to camelCase for method name generation
35 38 $method_name = 'render' . easy_invoice_str_replace('_', '', ucwords($type, '_')) . 'Field';
36 39
@@ -610,9 +613,9 @@
610 613 }
611 614
612 615 // Check if toggle state is enabled (either from selected gateways or toggle state field)
613 616 $toggle_enabled = $has_custom_selection;
614 - if ($invoice && method_exists($invoice, 'getPaymentGatewaysToggleState')) {
617 + if ($invoice && is_callable([$invoice, 'getPaymentGatewaysToggleState'])) {
615 618 $toggle_state = $invoice->getPaymentGatewaysToggleState();
616 619 if ($toggle_state === '1') {
617 620 $toggle_enabled = true;
618 621 }