Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camptix Invoices: Avoid a PHP Notice if not yet setup. #1396

Open
wants to merge 2 commits into
base: production
Choose a base branch
from

Conversation

dd32
Copy link
Member

@dd32 dd32 commented Oct 15, 2024

A semi-annoying PHP Notice is being generated when creating an invoice on the WordCamp site, but the Camptix VAT ID field hasn't been set.

GET https://xxxxxxxxx.wordcamp.org/2024/wp-admin/post-new.php?post_type=tix_invoice

E_NOTICE: Undefined index: invoice-vat-number
File: wp-content/plugins/camptix-invoices/camptix-invoices.php:261
Stack Trace: require('wp-admin/edit-form-advanced.php'), do_meta_boxes, ctx_invoice_metabox_editable

This doesn't appear to indicate anything is wrong, just that the specific settings haven't yet been updated.

@dd32 dd32 added [Component] Payments Payment tools, budgets, invoices [Priority] Low labels Oct 15, 2024
@dd32
Copy link
Member Author

dd32 commented Oct 15, 2024

Few more...

POST https://xxxxxxxxx.wordcamp.org/2024/wp-admin/post.php

Stack Trace: edit_post, wp_update_post, wp_insert_post, do_action('save_post'), WP_Hook->do_action, WP_Hook->apply_filters, ctx_generate_invoice_document, CampTix_Addon_Invoices::create_invoice_document, include('/plugins/camptix-invoices/includes/views/invoice-template.php')

E_NOTICE Undefined index: invoice-thankyou
File: wp-content/plugins/camptix-invoices/includes/views/invoice-template.php:211

E_NOTICE Undefined index: invoice-company
File: wp-content/plugins/camptix-invoices/includes/views/invoice-template.php:135

E_NOTICE Undefined index: invoice-date-format
File: wp-content/plugins/camptix-invoices/includes/class-camptix-addon-invoices.php:376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Payments Payment tools, budgets, invoices [Priority] Low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant