WordPress Plugin

Hi everyone,

One of the most requested issues on GitHub is to build a WordPress plugin. We’re looking into it now, it’d be helpful to hear from you about which features you’d like to see implemented.

Thank you for your input!

Hey @hillel,

great to hear that!

As I mentioned, I have already started developing a WooCommerce plugin and have made the following considerations. They are not yet fully developed because, as described here (WordPress plugin development - #3 by juwillsee), I have encountered some scheduling difficulties. I hope the input helps you.

Project Requirements: Development of a WordPress Plugin for WooCommerce and Integration with Invoice Ninja

Features and Requirements:

  1. Product Management:
  • Synchronization of WooCommerce Product Catalog with Invoice Ninja:
    • Products created, edited, or deleted in WooCommerce should be automatically updated in Invoice Ninja.
  • Manual Synchronization:
    • Allow manual synchronization of products.
  • Exclusion of Specific Products:
    • Products that should not be billed through Invoice Ninja should be excluded from synchronization.
  1. Customer Management:
  • Customer Registration and Management via WooCommerce:
    • Synchronize customer data between WooCommerce and Invoice Ninja to ensure a consistent data base.
  1. Payment Processing:
  • Integration of Payment Processing:
    • Integrate payment processing between WooCommerce, Invoice Ninja, and Stripe.
    • Payment data should be transmitted to Stripe via Invoice Ninja and stored there.
    • Invoice Ninja should act as the payment provider in WooCommerce for billing purposes.
  1. Frontend Display:
  • Frontend Integration:
    • The plugin should be integrated into the WooCommerce frontend, ensuring a user-friendly display of products and payment processes.
    • Ensure that all WooCommerce frontend functions remain fully available without restrictions.
  1. Document Dispatch:
  • Creation and Dispatch of Invoices and Delivery Notes:
    • Invoices and delivery notes should be created via the WooCommerce dashboard but dispatched to the customer through the Invoice Ninja platform.

I also created a small WordPress plugin that syncs WooCommerce user data to InvoiceNinja. Happy to share the code with you, @hillel, if needed.

That would be great, thanks! Is the code available on GitHub?

1 Like

Hi @hillel
no, not yet, but I can add it there and give you access.

That would be great, thanks!

Please make sure the repo has a permissive license, ie. MIT.

1 Like

Thank you for sharing your code, it was helpful to review.

I’m not very familiar with WooCommerce, is a customer in WooCommerce stored as a user in WordPress? In which case calling get_userdata returns the WordPress/WooCommerce record?

Also, are there other features which would be useful for a WooCommerce integration?

One other thing, I think there may be a problem with how your code updates clients. It isn’t using the contact id which will cause new contacts to be created each time the client is updated.

Yes, they’re stored as WordPress users. get_userdata() should always return the records.

Not for me, but for other users for sure.

That doesn’t happen in my case. I use this plugin now for 8-9 months and never had this issue.

Thanks for the info!

Note: it’s possible it’s happening but you haven’t noticed, I suggest checking the contacts table in the database to see if there are duplicate records.

If this problem occurs the app may appear to work however clients will lose access to their past invoices in the client portal.

Edit: it’s also possible the issue I’m referring to only affected v4 and was resolved in v5.

1 Like

@lucaw thanks again for sharing your code! I’ve added you to the credits on the readme, please let me know if needs adjusting.

Note: the initial release is ready, just working on the docs…

1 Like

thank you very much!