You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am reaching out regarding an issue we are facing with LearnPress certificates on our WordPress site.
When a user tries to view or download their course certificate, it fails to load. After investigating, we discovered that the issue stems from the certificate files being offloaded to Google Cloud Storage by WP Stateless. Unfortunately, LearnPress requires these certificate files to remain on the local site to function correctly.
To resolve this, we need a way to ensure that certificates generated by LearnPress are not offloaded to Google Cloud Storage and instead remain available on the local server.
We would appreciate your guidance on how to configure WP Stateless or implement an exception for these certificate files. If any additional information or access is required, please let us know.
Unfortunately, I have no experience with LearnPress, but I hope I can give you some recommendations for starting.
There is a hook, wp_stateless_skip_add_media, which you can use to control whether the file should be uploaded to Google Cloud Storage.
You can use it like this:
add_filter('wp_stateless_skip_add_media', 'my_wp_stateless_skip_add_media', 10, 5);
functionmy_wp_stateless_skip_add_media($skip, $metadata, $attachment_id, $force, $args) {
if ( /* we should NOT upload to GCS*/ ) {
returntrue;
}
return$skip;
}
The parameters of this hook are:
$skip - if NOT true WP-Stateless will upload the file to GCS;
$metadata - post metadata;
$attachment_id - attachment post ID;
$force - force overwrite the file even if it already exists;
$args - additional arguments related to WP-Stateless functionality.
You can use this hook to check if the attachment is a LearnPress certificate and decide whether to upload it to GCS.
Please let me know if this helps you and if you need further assistance.
Dear WP Stateless Support Team,
I am reaching out regarding an issue we are facing with LearnPress certificates on our WordPress site.
When a user tries to view or download their course certificate, it fails to load. After investigating, we discovered that the issue stems from the certificate files being offloaded to Google Cloud Storage by WP Stateless. Unfortunately, LearnPress requires these certificate files to remain on the local site to function correctly.
To resolve this, we need a way to ensure that certificates generated by LearnPress are not offloaded to Google Cloud Storage and instead remain available on the local server.
We would appreciate your guidance on how to configure WP Stateless or implement an exception for these certificate files. If any additional information or access is required, please let us know.
Thank you for your support and assistance.
Best regards,
Ibrahem Elzalabany
https://medelevus.com
The text was updated successfully, but these errors were encountered: