Coernel82 / SEPA-QR-for-Woocommerce

Plug-and-Play Plugin for Woocommerce
GNU General Public License v2.0
4 stars 9 forks source link

Image support #20

Open petermorlion opened 1 year ago

petermorlion commented 1 year ago

This is a start of addressing #17

I added a settings page because the admin should be able to choose between GDPR compliant or not (I assume storing the images means they need to notify their customers to remain GDPR compliant). If the option is enabled, I store the image in the uploads folder (in a plugin subdirectory) and use the URL instead.

The only thing I can't yet figure out is that the generated PNG image doesn't seem correct and so it's not loading.

Also something that (possibly) remains to be done is to clean up the images after a while. For example, you could have the system remove the images when an order is set to Completed.

Let me know what you think.

Coernel82 commented 1 year ago

Hello @petermorlion, thank you for your work. To my understanding storing the QR codes as images is no GDPR problem as it does not contain any personal information! It contains the public bank account number of the sellers webpage and the order number. So to my mind notification about that is not the issue. However I am a singing teacher not a lawyer.

However adding an admin page generally is a good idea to switch this option on or off. About generating the wrong QR code I have no clue as I am not a programmer. @designzwang maybe you want to have a look at?

Also the issue with a large pile of QR codes not being deleted surely needs to be addressed. Also there should be a proper uninstall routine which deletes the images unless otherwise addressed on the admin settings page.

petermorlion commented 1 year ago

Ok, I made some changes:

Still to do: remove the QR codes after a while, to avoid spamming the server. There are a few options I see:

I'm curious to your opinion on this.

Coernel82 commented 1 year ago

Sorry for the late reply I have been tremendously busy the last months - I am a singing teacher, no programer! Programing is just my hobby. I will have a look at it soon. As I am not really experienced with GitHub please tell me how I can easily download the plugin from your pull request. Also tell me in which folder the plugin will save the pictures - so I can test the uninstall routine! I will then install it locally with XAMPP, test it and have a look at the code and then will be more than happy to publish it here and to the WordPress directory.

petermorlion commented 1 year ago

No worries. I think you can download it by going to my fork, clicking on the green "Code" button and selecting "Download ZIP". Then unzip and move the mxp-sepaqr subdirectory to your Wordpress plugins folder.

The QR images are stored in the upload directory of your Wordpress installation. It's probably something that can be configured, but by default it's /wp-content/uploads. In that folder, I put the QR codes in a subfolder calls muxp-sepa-qr-code-addon-for-woocommerce.

Coernel82 commented 12 months ago

Hi, I updated my faulty code with the correct code from the WordPress SVN. However now there are conflicts. Can you resolve them? Sorry for the very long delay but due to very stressful months I had to prioritize. As this is just a hobby project it was at the lowest priority!

petermorlion commented 11 months ago

Thanks for the update. I rebased my changes so all conflicts are resolved now.

Coernel82 commented 9 months ago

I was able to test your pull request. For me it does show the QR-Code on the checkout page however it results in a parser error for my PDF-invoices plugin. Also it does not show the QR-Code in the confirmation mail. As my online shop just creates around 40 invoices a year it is not worth for me pursuing this project further. Me and my wife expect a baby in summer so there is no capacity any more for this hobby project. Thank you very much for your great work!

Maybe you want to rename your fork to SEPA-QR-for-Woocommerce-Advanced or something and continue this project and even publish it on the WordPress repository. I would be happy if this project is kept alive. For my part I will just update the readme for the WordPress repository to show its compatibility for upcoming WordPress versions.

I will put this project dormant now.