Plugin produces fatal error on website
-
Hey!
I am writing regarding the plugin. It used to work perfectly fine but now it produces a fatal error on the website, when someone wants to access the downloadable product.
That’s why I deactivated it, but I’d definitely like to reinstall it. I hope you as developer of the plugin are interested to make it work. So far I couldn’t figure out what the exact problem is.
Thanks for your help and the free plugin.
Best regards
Miriam
The page I need help with: [log in to see the link]
-
Thanks for your message. Unfortunately it doesn’t provide enough information for us to begin work. Please read https://www.ads-software.com/support/topic/before-you-post-please-read-2/ and get back to us with the information we need in order to reproduce this problem. Currently you are the only one experiencing this (who has written) so something about this error is unique to your setup. Only you can clue us in as to what that factor is!
Thank you.
Hey @standarthoid
Are you still there? We’d like to help on this but need more information from you. If we don’t hear back we’ll assume you’ve moved on, and close this topic in a week or two. We hope to hear back!
Hey! I’m sorry, I was supposedly going to get notified, when you answered, but I did not, so I just read your message now.
I just tried updating the plugin, which didn’t help to solve the problem. I could finally pinpoint the error, which is apparently caused by a little codesnippet I added, which used to work perfectly fine till recently. Maybe you could take a look at it and help me get down to the cause of the problem?
It shows up, when my customers buy a product and then try to access the pdf file via the provided link.
Here’s the snippet:
function fetch_custom_checkout_field( $input, $order_id, $product_id ) { // when we find [BILLING_COMPANY] in a watermark, replace it with the order's billing production $order = wc_get_order( $order_id ); $data = $order->get_data(); $order_meta = get_post_meta($order_id); $input = preg_replace( '/\[BILLING_COMPANY\]/', $data['billing']['company']." Produktion: ".$order_meta[_billing_production][0], $input ); return $input; } add_filter( 'wwpdf_filter_overlay', 'fetch_custom_checkout_field',10 , 3); add_filter( 'wwpdf_filter_footer', 'fetch_custom_checkout_field',10, 3);
Here ist the copy of the status report:
WordPress Environment WordPress address (URL): https://hankemacht.com
Site address (URL): https://hankemacht.com
WC Version: 7.7.2
REST API Version: ? 7.7.2
WC Blocks Version: ? 10.0.6
Action Scheduler Version: ? 3.5.4
Log Directory Writable: ?
WP Version: 6.2.2
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ?
Language: de_DE
External object cache: – Server Environment Server Info: Apache
PHP Version: 8.0.28
PHP Post Max Size: 200 MB
PHP Time Limit: 30
PHP Max Input Vars: 3000
cURL Version: 7.68.0
OpenSSL/1.1.1f SUHOSIN Installed: –
MySQL Version: 10.5.19-MariaDB-1:10.5.19+maria~ubu2004-log
Max Upload Size: 200 MB
Default Timezone is UTC: ?
fsockopen/cURL: ?
SoapClient: ?
DOMDocument: ?
GZip: ?
Multibyte String: ?
Remote Post: ?
Remote Get: ? Database WC Database Version: 7.7.2
WC Database Prefix: wp_
Datenbank-Gesamtgr??e: 86.79MB
Datenbank-Datengr??e: 71.36MB
Datenbank-Indexgr??e: 15.43MB
wp_woocommerce_sessions: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Daten: 0.14MB + Index: 0.13MB + Engine InnoDB
wp_woocommerce_tax_rates: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Daten: 1.03MB + Index: 0.16MB + Engine InnoDB
wp_actionscheduler_claims: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Daten: 0.13MB + Index: 0.13MB + Engine InnoDB
wp_borlabs_cookie_consent_log: Daten: 0.13MB + Index: 0.05MB + Engine InnoDB
wp_borlabs_cookie_content_blocker: Daten: 0.05MB + Index: 0.02MB + Engine InnoDB
wp_borlabs_cookie_cookies: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_borlabs_cookie_groups: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_borlabs_cookie_script_blocker: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_borlabs_cookie_statistics: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_commentmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Daten: 0.05MB + Index: 0.09MB + Engine InnoDB
wp_duplicator_pro_entities: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_duplicator_pro_packages: Daten: 23.02MB + Index: 0.02MB + Engine InnoDB
wp_formmaker: Daten: 0.08MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_backup: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_blocked: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_cookies: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_display_options: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_formmaker_groups: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_query: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_sessions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_submits: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_themes: Daten: 0.14MB + Index: 0.00MB + Engine InnoDB
wp_formmaker_views: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_links: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_login_redirects: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_mailchimp_carts: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_mailchimp_jobs: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Daten: 10.08MB + Index: 1.22MB + Engine InnoDB
wp_postmeta: Daten: 15.09MB + Index: 6.77MB + Engine InnoDB
wp_posts: Daten: 11.33MB + Index: 0.66MB + Engine InnoDB
wp_realmedialibrary: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_realmedialibrary_meta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_realmedialibrary_posts: Daten: 0.08MB + Index: 0.06MB + Engine InnoDB
wp_realmedialibrary_tmp: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_rednao_wc_invoice: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_rednao_wc_invoices_created: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_rednao_wc_invoices_custom_field: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_shortpixel_folders: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_shortpixel_meta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_shortpixel_postmeta: Daten: 2.52MB + Index: 2.61MB + Engine InnoDB
wp_shortpixel_queue: Daten: 3.19MB + Index: 0.17MB + Engine InnoDB
wp_snippets: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_storeabill_documentmeta: Daten: 0.11MB + Index: 0.09MB + Engine InnoDB
wp_storeabill_documents: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_storeabill_document_itemmeta: Daten: 0.16MB + Index: 0.14MB + Engine InnoDB
wp_storeabill_document_items: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_storeabill_document_noticemeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_storeabill_document_notices: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_storeabill_journals: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_termmeta: Daten: 0.09MB + Index: 0.13MB + Engine InnoDB
wp_terms: Daten: 0.08MB + Index: 0.09MB + Engine InnoDB
wp_term_relationships: Daten: 0.19MB + Index: 0.11MB + Engine InnoDB
wp_term_taxonomy: Daten: 0.08MB + Index: 0.11MB + Engine InnoDB
wp_usermeta: Daten: 0.20MB + Index: 0.09MB + Engine InnoDB
wp_users: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wcpv_commissions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wcpv_per_product_shipping_rules: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_notes: Daten: 0.09MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Daten: 0.06MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_coupon_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_attributes_lookup: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_download_directories: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Daten: 0.08MB + Index: 0.09MB + Engine InnoDB
wp_wc_rate_limits: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_gzd_dhl_im_products: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_dhl_im_product_services: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_packaging: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_gzd_packagingmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_shipmentmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_shipments: Daten: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_woocommerce_gzd_shipment_itemmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_shipment_items: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_gzd_shipment_labelmeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_shipment_labels: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_gzd_shipping_provider: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_gzd_shipping_providermeta: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wpam_actions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_affiliates: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_affiliates_fields: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_creatives: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_events: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_impressions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_messages: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_paypal_logs: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_tracking_tokens: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_tracking_tokens_purchase_logs: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpam_transactions: Daten: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpuf_subscribers: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wpuf_transaction: Daten: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_yith_wcwl: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_yith_wcwl_lists: Daten: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_yoast_indexable: Daten: 1.13MB + Index: 0.50MB + Engine InnoDB
wp_yoast_indexable_hierarchy: Daten: 0.08MB + Index: 0.14MB + Engine InnoDB
wp_yoast_migrations: Daten: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_yoast_primary_term: Daten: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_yoast_seo_links: Daten: 0.06MB + Index: 0.03MB + Engine InnoDB Post Type Counts attachment: 2235
custom_css: 1
customize_changeset: 1
document_template: 6
et_body_layout: 8
et_footer_layout: 1
et_header_layout: 1
et_pb_layout: 15
et_template: 17
et_theme_builder: 1
form-maker: 1
jetpack_migration: 2
nav_menu_item: 20
page: 34
post: 2
product: 492
product_variation: 91
revision: 466
shop_coupon: 2
shop_order: 37
shop_order_refund: 3
shop_subscription: 17
watermark: 1
wc_membership_plan: 3
wc_user_membership: 4
wp_global_styles: 1
wpuf_forms: 2
wpuf_input: 99
wpuf_profile: 1 Security Secure connection (HTTPS): ?
Hide errors from visitors: ? Active Plugins (30) ManageWP - Worker: von GoDaddy – 4.9.17
Borlabs Cookie - Cookie Opt-in: von Borlabs GmbH – 2.2.63
Classic Editor: von WordPress-Mitwirkende – 1.6.3
Code Snippets: von Code Snippets Pro – 3.4.0
Customize My Account for WooCommerce: von SysBasics – 1.6.0
Duplicator Pro: von Duplicator – 4.5.11.1
Easy Watermark: von BracketSpace – 1.0.11
Jetpack: von Automattic – 12.1.1
Loco Translate: von Tim Whitlock – 2.6.4
Login IP & Country Restriction: von Iulia Cazan – 6.4.0
Login Logout Menu: von WPBrigade – 1.4.0
Mailchimp for WooCommerce: von Mailchimp – 2.8.3
One Stop Shop für WooCommerce: von vendidero – 1.3.8
LoginWP (Formerly Peter's Login Redirect): von LoginWP Team – 3.0.8.0
Popups for Divi: von divimode.com – 3.0.5
Real Media Library (Free): von devowl.io – 4.20.4
Safe SVG: von 10up – 2.1.1
ShortPixel Image Optimizer: von ShortPixel - Convert WebP/AVIF & Optimize Images – 5.2.3
Benutzer-Menüs: von Code Atlantic – 1.3.1
WaterMark PDF for WooCommerce: von Sagehen Studio – 3.3
WooCommerce Checkout Field Editor: von WooCommerce – 1.7.9
Germanized für WooCommerce Pro: von vendidero – 3.7.0
Germanized für WooCommerce: von vendidero – 3.13.0
WooCommerce PayPal Payments: von WooCommerce – 2.0.5
WooCommerce Product Vendors: von WooCommerce – 2.1.78
WooCommerce: von Automattic – 7.7.2
Yoast SEO: von Team Yoast – 20.8
WP Super Cache: von Automattic – 1.9.4
WP User Frontend Pro - personal: von weDevs – 3.4.13
WP User Frontend: von weDevs – 3.6.5 Inactive Plugins (1) vendidero Helper: von vendidero – 2.2.0 Dropin Plugins (1) advanced-cache.php: advanced-cache.php Must Use Plugins (1) ManageWP - Worker Loader: von GoDaddy – 1.0.0 Settings API Enabled: –
Force SSL: –
Currency: EUR (€)
Currency Position: right_space
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5) Connected to WooCommerce.com: ?
Enforce Approved Product Download Directories: –
HPOS feature screen enabled: –
HPOS feature enabled: –
Order datastore: WC_Order_Data_Store_CPT
HPOS data sync enabled: – WC Pages Shop-Basis: #9 - /shop/
Warenkorb: ? Die Seite enth?lt nicht den [woocommerce_cart]-Shortcode oder woocommerce/cart-Block.
Kasse: #11 - /kasse/
Mein Konto: #12 - /mein-konto/
Allgemeine Gesch?ftsbedingungen: #7860 - /agbs/ Theme Name: Divi
Version: 4.21.0
Author URL: https://www.elegantthemes.com
Child Theme: ? – Wenn du WooCommerce mit einem Theme
das du nicht selbst entwickelt hast
an eigene Bedürfnisse anpasst
dann empfehlen wir die Verwendung eines Child-Themes. Siehe Wie du ein Child-Theme erstellst (engl.) WooCommerce Support: ? Templates Overrides: – WooCommerce PayPal Payments Onboarded: ?
Shop country code: DE
WooCommerce currency supported: ?
Advanced Card Processing available in country: ?
Pay Later messaging available in country: ?
Webhook status: –
Vault enabled: ?
Logging enabled: ?
Reference Transactions: –
Used PayPal Checkout plugin: –
Tracking enabled: – Admin Enabled Features: activity-panels
analytics
coupons
customer-effort-score-tracks
import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page Disabled Features: product-block-editor
minified-js
new-product-management-experience
product-variation-management
settings Daily Cron: ? Next scheduled: 2023-06-11 10:19:59 +02:00
Options: ?
Notes: 135
Onboarding: completed Action Scheduler Complete: 406
Oldest: 2023-05-10 15:20:13 +0200
Newest: 2023-06-10 12:35:29 +0200 Failed: 24
Oldest: 2022-11-02 00:58:37 +0100
Newest: 2023-06-01 10:14:23 +0200 Pending: 9
Oldest: 2023-06-10 12:35:55 +0200
Newest: 2023-06-11 09:21:00 +0200 Status report information Generated at: 2023-06-10 12:35:38 +02:00
`Thank you very much for your help
best regards
Miriam
Hi Miriam,
I’m glad you were able to sort that out. I would recommend you simply not use that customization snippet until you are able to have your developer take a look at it. Until now I’d at least change it like this:
function fetch_custom_checkout_field( $input, $order_id, $product_id ) { // when we find [BILLING_COMPANY] in a watermark, replace it with the order's billing production $order = wc_get_order( $order_id ); $data = $order->get_data(); $order_meta = get_post_meta($order_id); $input = preg_replace( '/\[BILLING_COMPANY\]/', $data['billing']['company']." Produktion: ".$order_meta['_billing_production'][0], $input ); return $input; } // add_filter( 'wwpdf_filter_footer', 'fetch_custom_checkout_field',10, 3);
You are using the free version of the plugin yet using a snippet that looks designed for the paid version, so I removed the hook used in the paid version. Secondly I commented out the call to the ‘wwpdf_filter_footer’ hooked function because it is causing problems. But I made one slight change that might make it work if you experiment un-commenting it. It could just be a matter of it breaking when you upgraded your PHP version.
However, with WooCommerce HPOS being pushed out soon (August), it will probably break again for you, and you might then need code more like this:
function fetch_custom_checkout_field( $input, $order_id, $product_id ) { // when we find [BILLING_COMPANY] in a watermark, replace it with the order's billing production $order = wc_get_order( $order_id ); $data = $order->get_data(); $billing_prod = $order->get_meta( '_billing_production', true ); if ( isset( $billing_prod ) ) { $input = preg_replace( '/\[BILLING_COMPANY\]/', $data['billing']['company'] . " Produktion: " . $billing_prod, $input ); } return $input; } add_filter( 'wwpdf_filter_footer', 'fetch_custom_checkout_field',10, 3);
If you don’t understand parts of this, or this code still doesn’t work, please refer to your developer for further help. If this helps you please take a moment to leave feedback for this free plugin. We do not usually provide free code snippets or code help for the unpaid version, because we need to focus on putting food on the table. I am going to close this support ticket soon because it has to do with your snippet/customization, and not with the plugin itself. Thanks for understanding. ??
Thanks for taking a look at the issue! You helped me a lot!
- The topic ‘Plugin produces fatal error on website’ is closed to new replies.