De Software Licensing Extension voor Easy Digital Downloads vereist enige configuratie en integratie – en het is mogelijk dat u enkele problemen ondervindt. Enkele daarvan worden hier met mogelijke oplossingen uiteengezet.
Veelgestelde vragen
Hoe neem je contact op met klanten als er een update beschikbaar is?
Het wordt aanbevolen om een e-mailmarketingdienst te gebruiken, zoals Mailchimp of ConvertKit. WordPress wordt niet aanbevolen voor het verzenden van massale e-mails, dus het contacteren van gebruikers moet extern aan EDD/WordPress gebeuren.
Is het mogelijk om aangepaste / enterprise licenties te verkopen?
Hoewel er geen ingebouwde ondersteuning is voor het verkopen van aangepaste of enterprise licenties die op een groter aantal sites kunnen worden geactiveerd, zijn er workarounds om dit te laten werken. De eenvoudigste optie is om de klant te factureren via een Stripe- of PayPal-factuur. Eenmaal betaald, maakt u handmatig een bestelling aan en werkt u het limiet voor licentieactivaties bij naar het aantal activaties dat u de klant wilt laten hebben.
Werkt Software Licensing met Amazon S3?
Ja, het is volledig compatibel zonder problemen en zonder speciale instellingen.
Hebben lokale / ontwikkelomgevingen invloed op het activatietotaal?
Als u ervoor kiest om het aantal licentieactivaties dat een klant mag hebben te beperken, is het nog steeds mogelijk om ze een licentie te laten activeren in hun lokale ontwikkelomgeving zonder hun activatietotaal te beïnvloeden.
Dit stelt uw gebruikers in staat om eenvoudig up-to-date te blijven in hun test- en ontwikkelomgevingen zonder gratis licentieactivaties te krijgen.
Om dit te laten werken, moeten twee dingen gebeuren:
1) Lokale host-URL's negeren
Zoek in uw WordPress-admin, onder
Downloads → Instellingen → Extensies → Software Licensing naar een selectievakje met de tekst Lokale host-URL's negeren. Zorg ervoor dat dit is aangevinkt.

2) Klanten informeren
Zie deze gids over hoe activaties voor ontwikkelingssites te negeren.
Hoe maak je aangepaste licentiesleutelformaten?
EDD-licentiesleutels zijn standaard een md5-som zoals deze:
e0c7ccc47b2613c82d1073a4214deecc
Als u iets anders wilt, is het met Software Licensing net zo eenvoudig als het maken van een functie om consistente unieke sleutels te maken en te haken op een filter genaamd edd_sl_generate_license_key.
Licentiesleutelformaten kunnen werkelijk alles zijn wat u wilt, zolang ze uniek en consistent zijn. Als u sleutels in dit formaat wilt:
username_timestamp_licensekey sdavis2702_20151015120022_e0c7ccc47b2613c82d1073a4214deecc
U kunt deze functie gebruiken:
// Example shown how to base the MD5 off of the user's email and purchase date
function pw_edd_license_md5_user_and_date( $key, $license_id, $download_id, $payment_id, $cart_index ) {
$name = get_user_by( 'email', edd_get_payment_user_email( $payment_id ) );
$date = get_post_field( 'post_date', $payment_id );
$timestamp = strtotime($date);
$nice_date = date( 'Yndhis', $timestamp );
$license = md5( $license_id );
$key = $name->user_nicename . '_' . $nice_date . '_' . $license;
return $key;
}
add_filter( 'edd_sl_generate_license_key', 'pw_edd_license_md5_user_and_date', 10, 5 );
Een eenvoudigere functie gebruikt alleen gebruikersnaam en licentiesleutel:
// prepend user's username to license key
function sd_edd_license_username_md5( $key, $license_id, $download_id, $payment_id, $cart_index ) {
$name = get_user_by( 'email', edd_get_payment_user_email( $payment_id ) );
$license = md5( $license_id );
$key = $name->user_nicename . '_' . $license;
return $key;
}
add_filter( 'edd_sl_generate_license_key', 'sd_edd_license_username_md5', 10, 5 );
Het belangrijkste om uit dit document te halen is dat u elke code kunt gebruiken die consistente unieke strings produceert en die strings als licentiesleutels kunt gebruiken.
Een lijst met licentiesleutels van klanten weergeven
De volgende code stelt u in staat om een lijst met licentiesleutels voor een specifieke klant op te halen en weer te geven.
Opmerking: De "$customer->id" moet worden vervangen door de daadwerkelijke klant-ID.
$licenses = edd_software_licensing()->licenses_db->get_licenses( array( 'number' => -1, 'customer_id' => $customer->id, 'orderby' => 'id', 'order' => 'ASC', ) );
Wat gebeurt er als het domein van mijn winkel offline gaat?
We moedigen u aan om de EDD Software Licensing SDK te gebruiken om licenties in uw WordPress-plugin of -thema te beheren. De SDK zal geen herhaalde API-verzoeken naar uw site sturen als deze geen geldige reactie ontvangt.
Als u van domein wilt veranderen of een domeinnaam wilt stopzetten, kunt u het beste een update uitbrengen die het nieuwe domein gebruikt of de aanroepen naar de API volledig verwijdert.
Veelvoorkomende problemen
Voorbeeldcode aanpassen
De voorbeeldcode die bij Software Licensing wordt geleverd, kan functies met voorvoegsels zoals edd_ en edd_sl_ gebruiken. Deze moeten worden gewijzigd om overeen te komen met uw eigen plugin, en zoeken en vervangen is een uitstekende manier om dit te doen, maar u moet voorzichtig zijn met uw zoekreeks.
Er zijn functies met voorvoegsels zoals edd_action_ die niet mogen worden gewijzigd. Zorg ervoor dat u alleen uw eigen functienaamvoorvoegsels wijzigt en niet de EDD-kernvoorvoegsels.
Problemen met updates oplossen
Als u fouten ziet bij het proberen bij te werken van plugins en thema's uit uw Software Licensing-winkel, zijn hier een paar dingen die u kunt controleren, afhankelijk van de gerapporteerde fout.
Pas uw Updater aan
Als u de verouderde plugin-updaterklasse gebruikt die in eerdere versies van Software Licensing is geleverd, gebruikt u waarschijnlijk de klasse EDD_SL_Plugin_Updater om licenties en updatecontroles te beheren. Er is een risico op een "conflict" als een andere plugin een andere versie van de klasse EDD_SL_Plugin_Updater bevat dan u met uw plugin verpakt. U kunt deze klasse hernoemen naar iets unieks voor uw plugin, zodat conflicten worden vermeden. Als mijn plugin bijvoorbeeld "My Custom Ads" heet, zou ik EDD_SL_Plugin_Updater hernoemen naar MCA_Plugin_Updater en alle verwijzingen ernaar wijzigen. Als alternatief zal het gebruik van de EDD Software Licensing SDK aanzienlijk vereenvoudigen hoe u plugin/thema-updates kunt beheren.
SSL-fouten
Er zijn veel fouten die kunnen worden veroorzaakt door SSL-connectiviteitsproblemen; de volgende worden vaak gezien met Software Licensing.
SSL: de naam van het certificaatonderwerp komt niet overeen
Deze fout betekent dat het SSL-certificaat dat op uw site is geïnstalleerd, niet overeenkomt met uw primaire domeinnaam. Dit kan typisch gebeuren in gedeelde hostingomgevingen en de meest voorkomende oplossing is om een toegewijd IP-adres aan te vragen bij uw hostingprovider. Als uw hostingprovider geen toegewijde IP-adressen ondersteunt, moet u met uw hostingprovider samenwerken om een juiste SSL-keten te configureren die overeenkomt met uw primaire domein, in plaats van een gedeeld wildcard SSL-certificaat.
SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
This SSL Handshake error occurs when the OpenSSL version on the server of the site requesting the update is outdated and does not support the SSL Protocols that the store delivering the update requires. There are two ways to resolve this issue. The ideal solution is to have the site requesting the update verify that their OpenSSL software us up to date for their platform. OpenSSL is a server software that facilitates the communication over the HTTPS protocol. If this is not a possible solution, you can work with your hosting provider or server administrator to configure your web-server to accept these outdated SSL versions, but this is not ideal as it allows less secure connections to your server.
cURL error 35: SSL connect error
This specific error with Software Licensing delivering updates is usually seen when using Cloudflare’s Flexible SSL option. This option causes a chain issue with some cURL versions that exist on the client server requesting the update. There are a couple ways to fix this from the server side (without having to request the client to update their cURL version). The first is to upgrade to a paid Cloudflare SSL. The paid tier SSL Certificates from Cloudflare typically do not pose this problem. The other soluttion is to purchase an SSL Certificate from a 3rd party and install it directly on your server.
Download failed. SSL: no alternative certificate subject name matches target host name
An error occurred while updating Resurrect: Download failed. SSL: certificate subject name '*.example.com' does not match target host name 'anotherexample.com'
This occurs when the customer’s site has an old version of either OpenSSL or cURL. The two sites then can’t communicate securely and the update fails.
The only fix is for the site with the older version of the software on their server to update to the latest versions.
Download failed. SSL peer certificate or SSH remote key was not OK
If your customers are seeing this error when updating their products, you will need to contact your web host to let them know that your SSL certificate is improperly configured:
Download failed. Service Unavailable
You’ll see this error when you are attempting to update a plugin or theme on a site that also hosts this plugin or theme. Due to the way that Software Licensing integrates with the WordPress Update API, it is not currently possible to update your own themes or plugins from the site that sells them. When WordPress installs an update, it temporarily puts your site into maintenance mode, and during that process your site cannot install its own update. To update a plugin or theme from a site that also sells it, you’ll need to manually install the update.
Download failed. Unauthorized / Too many redirects
This error occurs when updating your plugin or theme to a new version. When uploading your new version, if you add a new file with your new version and then delete the previous file row, as opposed to replacing the current version, it’s possible for this error to occur. Currently we are aware of this bug and are working to resolve it, however the simple solution in the meantime is to click the ‘Update’ button a 2nd time, to rewrite the file keys, or always replace the current file instead of adding your new files on a second file row.
Update Package Unavailable
When this error comes up, it typically means:
- There is an issue with the license activation on the customer’s site. There are few things to check if a customer reports this error. The first is that the domain they are trying to update has been activated for the license. You can determine this by going to Downloads → Licenses. You can then search for the license key the user is trying to update and click on ‘Manage Sites’ to be sure that the domain they are on is in the list. If it’s not, you can either add it yourself from the admin, or have the customer visit their License management page and activate it themselves.
- The other result is that a license is either expired or disabled. If this is the case the customer needs to either renew their license, or a site admin has disabled it manually.
Weird, long folder name after updater
This happens when the .zip file is created improperly. When creating the final .zip archive, it is important to zip the folder and its contents rather than just the contents of the folder.
The zip file structure should look something like this:
filename.zip
– product-name/
— file here
— another file here
In other words, the files must be in a folder and not at the top of the zip file. Repackage your file to include the folder name inside and that will fix it.
CloudFlare Integration
If you are using CloudFlare as a CDN, Caching Layer, or SSL provider, we recommend you configure CloudFlare to bypass cache for all URLs that contain the following string:
/edd-sl
This is the API endpoint for checking the license status and delivering update packages. If these endpoint URLs are cached it can cause issues with properly delivering updates to your customers.
PCLZIP_ERR_BAD_FORMAT
This error isn’t unique to the EDD Software Licensing platform but has a couple solutions that you might check. The first is that there is an adequate amount of disk space for the file to be downloaded and unpacked (assume you’ll need 2x the size of the .zip file in order to process the update). If your .zip file is 1MB you will need just over 2MB available to properly process an update. These numbers are not exactly 2x but it’s a good measure to start with.
Het andere dat u moet controleren, is dat het .zip-bestand niet beschadigd is. U kunt dit testen door het .zip-bestand over te zetten naar een andere computer (bijgevoegd in een e-mail of via USB) en te proberen het daar ook uit te pakken. Als het niet uitpakt op een andere computer, is er waarschijnlijk een probleem met het aanmaken van het .zip-bestand op de oorspronkelijke computer.
Deze fout kan ook worden veroorzaakt door een plugin of een script dat een fout genereert. Wanneer de Software Licensing API probeert het zip-pakket te maken, wordt de fout toegevoegd aan het zip-bestand, waardoor de structuur wordt verbroken. Normaal gesproken betekent dit dat uw website WP_DEBUG ingesteld heeft op TRUE in het wp-config.php-bestand. Hoewel het een goede manier is om op fouten te controleren, is het het beste om het ingesteld te hebben op FALSE op een live website. U kunt het ook ingeschakeld laten, maar de fouten loggen naar een bestand op uw server, in het bestand wp-contents/debug.log. Doe dit door de volgende regels toe te voegen aan het wp-config.php-bestand:
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_display', false );
