The Carta del Docente is an initiative by the Ministry of Education that offers a €500 bonus to teachers, to be spent on goods and services for professional and cultural development. For merchants operating with WooCommerce, accepting the Carta del Docente represents a significant opportunity to expand their customer base.
In this step-by-step guide, we will show you how to configure the ilGhera Carta Docente for WooCommerce plugin to accept payments with Carta del Docente in your store, from installation to the first payment.
What is the WC Carta del Docente plugin?
The plugin allows you to enable Carta del Docente payments on your WooCommerce store. At checkout, the voucher entered by the user is verified for validity, available credit, and relevance in terms of product type, ensuring compliance with the program’s rules.
Free version vs Premium
Before you start, it is important to know which version does what, because several steps below apply to the Premium version only.
The free version, available on WordPress.org, includes: uploading your own .pem certificate, mapping the WooCommerce product categories to the Carta del Docente goods categories, showing the Carta del Docente logo at checkout, and Sandbox mode with the demo certificate included in the plugin.
The Premium version adds: generation of the certificate request (.der) and of the final certificate (.pem) directly from the settings page, the product check that hides the payment method when the cart is not eligible, manual validation of vouchers on pending orders, exclusion of shipping costs, automatic voucher-to-coupon conversion, and full customisation of the emails sent to the customer.
Throughout this guide, the steps and options reserved for the Premium version are marked as (Premium).
Requirements
- WordPress 4.0+
- WooCommerce (tested up to 11)
- PHP with the SOAP extension enabled — the plugin talks to the Ministry web service over SOAP with client certificate authentication
- Carta del Docente digital certificate (for production only — not needed to test in Sandbox mode)
Step 1: Plugin Installation
Install the ilGhera Carta Docente for WooCommerce plugin from your WordPress admin panel:
- Go to Plugins → Add New.
- Search for “ilGhera Carta Docente for WooCommerce” and install it. This is the free version; the Premium version is downloaded from your ilGhera account and uploaded manually.
- Activate the plugin from the Plugins page.
- Once activated, go to WooCommerce → Carta Docente for WC to set your preferences.
Step 2: Test in Sandbox Mode First
You do not need your own certificate to try the plugin: in Sandbox mode the plugin uses the demo certificate bundled with it and talks to the Ministry test service, so this is the right place to start — before requesting anything.
- Enable the “Sandbox” checkbox in the settings page.
- Request test vouchers by writing to docenti@sogei.it.
- Test the complete payment flow with the test vouchers.
Sandbox mode is available in the free version too. Once the flow works as expected, turn it off and move on to the real certificate.
Step 3: Entering the Premium Key (Premium)
If you are running the Premium version, enter your Premium Key in the dedicated field at the top of the plugin settings page. This key is what keeps the plugin receiving updates. The field is not present in the free version.
Step 4: Certificate Configuration
The digital certificate is essential for the secure connection with the production Carta del Docente service. The settings page opens on the Certificate tab, which offers three paths:
Option A: Upload your certificate
If you already have a certificate (.pem), all you need to do is upload it with its password:
- In the Certificate tab, under “Upload certificate”, select the .pem file from your computer.
- Enter the password used to generate the certificate.
- Click on “Save certificate”.
The plugin will automatically verify the certificate’s validity and display its expiration date, highlighting it when the certificate is expiring or already expired.
This option is available in the free version as well.
Option B: Generate the certificate request (.der) (Premium)
If you don’t have a certificate yet, you can generate the request directly from the plugin:
- Fill in the required fields: State, Province, Locality, Company name, Company department, Name, Email, and Password.
- Click on “Download .der file”.
- Upload the .der file to the Carta del Docente portal to request the certificate.
Option C: Generate the final certificate (.pem) (Premium)
After obtaining the .cer file from the Carta del Docente portal:
- Upload the .cer file to the plugin.
- Click on “Generate certificate”.
- The plugin will automatically generate the final .pem certificate.
Note that the tools for options B and C are only displayed while no .pem certificate is present: once a valid certificate has been saved, the Certificate tab shows it — with its expiry date and a button to remove it — instead of the generation forms.
Step 5: Category Configuration
The Carta del Docente can only be used for specific goods and services. Configure the categories of purchasable products:
- In the Options tab, select the product categories corresponding to the purchasable goods.
- Each WooCommerce category is paired with the corresponding Carta del Docente goods category from the drop-down next to it.
- You can add more pairings by clicking the + icon at the end of the list.
Category mapping is available in the free version.
Step 6: Advanced Options
The plugin offers several options to customize payment behavior:
- Image usage — Display the Carta del Docente logo on the checkout page. Available in the free version.
- Product control (Premium) — Show the payment method only if the products in the cart are purchasable with Carta del Docente vouchers.
- Pending orders (Premium) — Vouchers are validated upon manual completion of orders.
- Shipping costs (Premium) — Exclude shipping costs from Carta del Docente payments.
- Coupon conversion (Premium) — If the entered voucher is less than the cart total, it is converted into a promotional code and applied to the order.
Step 7: Email Customization (Premium)
The Premium version lets you customize the emails sent to customers. These fields are visible but disabled in the free version:
- Order received — Message sent to the user upon order receipt.
- Email subject — Subject of the email sent in case of failed validation.
- Email header — Header of the email in case of failed validation.
- Failed order — Message sent when voucher validation is unsuccessful (supports the
[checkout-url]shortcode).
Step 8: Going Live and the First Payment
Once the configuration is complete and Sandbox mode is off, the Carta del Docente payment method is available at checkout. The gateway is enabled by default; its title and the message shown to the customer can be edited under WooCommerce → Settings → Payments → Carta del Docente.
- The customer adds products to the cart and proceeds to checkout.
- Selects the Carta del Docente payment method.
- Enters their voucher code.
- The plugin automatically verifies the voucher’s validity, available credit, and product relevance.
- If the voucher is valid, the order is completed and the voucher is consumed.
Conclusion
Configuring Carta del Docente payments in your WooCommerce store is simple with the ilGhera Carta Docente for WooCommerce plugin. By following this step-by-step guide, you can accept Carta del Docente payments in a compliant and automated way, expanding your customer base and offering a smooth shopping experience to your customers.
Ready to get started? Try ilGhera Carta Docente for WooCommerce for free on WordPress.org, then upgrade to ilGhera Carta Docente for WooCommerce — Premium for certificate (.der) generation, voucher-to-coupon conversion, and priority support.
0 Comments