Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter paradisiacxl

    (@paradisiacxl)

    The function that attaches it to the email:

    add_filter( 'woocommerce_email_attachments', 'vmt_attach_pdf_to_emails', 10, 4 );
    function vmt_attach_pdf_to_emails( $attachments, $email_id, $order, $email ) {
        $shipment_ids = get_post_meta($order->get_id(), '_myparcel_last_shipment_ids', true);
        $shipment_id = (explode(',',$shipment_ids))[0];
        $shipment_id = str_replace('[','',$shipment_id);
        $shipment_id = str_replace(']','',$shipment_id);
        $email_ids = array(  'customer_processing_order' );
        if ( in_array ( $email_id, $email_ids ) ) {
            $upload_dir = wp_upload_dir();
         	$attachments[] = $upload_dir['path'] . "/".$shipment_id.".pdf";      	
        }
        return $attachments;
    }
    • This reply was modified 2 years, 1 month ago by paradisiacxl.
    Thread Starter paradisiacxl

    (@paradisiacxl)

    We tried to switch the theme and create a manual order, the PDF wasn’t attached in the email – regardless of theme.

    2023-02-03T10:24:13+00:00 CRITICAL Uncaught Error: Cannot use object of type Requests_Response as array in /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/http.php:286
    Stack trace:
    #0 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/themes/astra/functions.php(844): wp_remote_retrieve_body(Object(Requests_Response))
    #1 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/class-wp-hook.php(308): show_manual_offer_email_btn(Object(Automattic\WooCommerce\Admin\Overrides\Order))
    #2 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #3 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php(301): do_action('woocommerce_ord...', Object(Automattic\WooCommerce\Admin\Overrides\Order))
    #5 /home/u237410284/domai in /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/http.php on line 286
    
    2023-02-03T10:31:37+00:00 CRITICAL Uncaught Error: Cannot use object of type Requests_Response as array in /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/http.php:286
    Stack trace:
    #0 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/themes/astra/functions.php(844): wp_remote_retrieve_body(Object(Requests_Response))
    #1 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/class-wp-hook.php(308): show_manual_offer_email_btn(Object(Automattic\WooCommerce\Admin\Overrides\Order))
    #2 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #3 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/views/html-order-items.php(301): do_action('woocommerce_ord...', Object(Automattic\WooCommerce\Admin\Overrides\Order))
    #5 /home/u237410284/domai in /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/http.php on line 286
    
    2023-02-03T10:44:49+00:00 CRITICAL Uncaught Error: Call to a member function get_id() on null in /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/themes/astra/functions.php:906
    Stack trace:
    #0 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/class-wp-hook.php(308): upload_shipping_label_to_uploads(6535)
    #1 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #2 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #3 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/themes/astra/woocommerce/checkout/thankyou.php(55): do_action('woocommerce_tha...', 6535)
    #4 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/u23741028...')
    #5 /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode- in /home/u237410284/domains/verkoopmijntelefoon.nl/public_html/wp-content/themes/astra/functions.php op de lijn 906

    • This reply was modified 2 years, 1 month ago by paradisiacxl.
    Thread Starter paradisiacxl

    (@paradisiacxl)

    Hey, I’m disclosing the information. We thought it was due to different versions of plugins but the issue persists after updating everything to the latest version. As soon as ElementsKit is active, the backend stops working properly and a console error appears.

    Console error: https://i.imgur.com/HwGBkbB.png


    ### wp-core ###

    version: 6.1.1
    site_language: en_US
    user_language: en_US
    permalink: /%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: undefined
    environment_type: production
    user_count: 36
    dotorg_communication: true

    ### wp-paths-sizes ###

    wordpress_path: /var/strattic/site/public_html
    wordpress_size: loading…
    uploads_path: /var/strattic/site/public_html/wp-content/uploads
    uploads_size: loading…
    themes_path: /var/strattic/site/public_html/wp-content/themes
    themes_size: loading…
    plugins_path: /var/strattic/site/public_html/wp-content/plugins
    plugins_size: loading…
    database_size: loading…
    total_size: loading…

    ### wp-dropins (2) ###

    advanced-cache.php: true
    db.php: true

    ### wp-active-theme ###

    name: Hello Elementor Child (hello-theme-child-master)
    version: 1.0.1
    author: Elementor Team
    author_website: https://elementor.com/
    parent_theme: Hello Elementor (hello-elementor)
    theme_features: core-block-patterns, widgets-block-editor, menus, post-thumbnails, automatic-feed-links, title-tag, html5, custom-logo, editor-style, align-wide, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider
    theme_path: /var/strattic/site/public_html/wp-content/themes/hello-theme-child-master
    auto_update: Disabled

    ### wp-parent-theme ###

    name: Hello Elementor (hello-elementor)
    version: 2.6.1
    author: Elementor Team
    author_website: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
    theme_path: /var/strattic/site/public_html/wp-content/themes/hello-elementor
    auto_update: Disabled

    ### wp-themes-inactive (2) ###

    Twenty Twenty-Three: version: 1.0, author: the WordPress team, Auto-updates disabled
    Twenty Twenty-Two: version: 1.3, author: the WordPress team, Auto-updates disabled

    ### wp-mu-plugins (5) ###

    Elementor Safe Mode: version: 1.0.0, author: Elementor.com
    MU WP Native PHP Sessions: version: 0.1, author: Pantheon
    Strattic: author: Strattic, version: (undefined)
    strattic-jet-smart-filters.php: author: (undefined), version: (undefined)
    strattic-search.php: author: (undefined), version: (undefined)

    ### wp-plugins-active (26) ###

    Classic Editor: version: 1.6.2, author: WordPress Contributors, Auto-updates disabled
    Code Snippets: version: 3.2.2, author: Code Snippets Pro, Auto-updates disabled
    Comeet: version: 2.2, author: Comeet, Auto-updates disabled
    Ele Custom Skin: version: 3.1.7, author: Dudaster.com, Auto-updates disabled
    Elementor: version: 3.8.1, author: Elementor.com, Auto-updates disabled
    Elementor Pro: version: 3.8.2, author: Elementor.com, Auto-updates disabled
    ElementsKit Lite: version: 2.7.5, author: Wpmet, Auto-updates disabled
    HubSpot All-In-One Marketing – Forms, Popups, Live Chat: version: 9.0.480, author: HubSpot (latest version: 9.0.500), Auto-updates disabled
    JetBlocks For Elementor: version: 1.3.4, author: Crocoblock, Auto-updates disabled
    JetEngine: version: 3.0.7, author: Crocoblock, Auto-updates disabled
    JetEngine – Trim string callback: version: 1.0.1, author: Crocoblock, Auto-updates disabled
    JetSmartFilters: version: 3.0.1, author: Crocoblock, Auto-updates disabled
    JetTabs For Elementor: version: 2.1.20, author: Crocoblock, Auto-updates disabled
    Migrate Guru: version: 4.78, author: Migrate Guru, Auto-updates disabled
    Post Types Order: version: 1.9.9.2, author: Nsp Code, Auto-updates disabled
    Redirection: version: 5.3.5, author: John Godley, Auto-updates disabled
    Simple Blog Stats: version: 20220928, author: Jeff Starr, Auto-updates disabled
    Sucuri Security – Auditing, Malware Scanner and Hardening: version: 1.8.35, author: Sucuri Inc., Auto-updates disabled
    SVG Support: version: 2.5.4, author: Benbodhi, Auto-updates disabled
    WebP Express: version: 0.25.5, author: Bj?rn Rosell, Auto-updates disabled
    WP Rocket: version: 3.12.3.2, author: WP Media, Auto-updates disabled
    WP Sync DB: version: 1.5, author: Sean Lang, Auto-updates disabled
    WP Sync DB Media Files: version: 1.1.4b1, author: Sean Lang, Auto-updates disabled
    Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast, Auto-updates disabled
    Yoast SEO: version: 19.10, author: Team Yoast, Auto-updates disabled
    YYDevelopment – Show Pages ID: version: 1.5.4, author: YYDevelopment, Auto-updates disabled

    ### wp-plugins-inactive (1) ###

    301 Redirects: version: 2.72, author: WebFactory Ltd, Auto-updates disabled

    ### code-snippets (6) ###

    snippet-1: name: Make upload filenames lowercase, scope: global, modified: 2022-07-18 12:07:16, tags: [sample, media]
    snippet-2: name: Disable admin bar, scope: front-end, modified: 2022-07-18 12:07:16, tags: [sample, admin-bar]
    snippet-3: name: Allow smilies, scope: global, modified: 2022-07-18 12:07:16, tags: [sample]
    snippet-4: name: Current year, scope: content, modified: 2022-07-18 12:07:16, tags: [sample, dates]
    snippet-5: name: Search results page post count, scope: global, modified: 2022-07-18 13:00:50
    snippet-6: name: Post counts shortcode, scope: global, modified: 2022-07-18 13:02:54

    ### wp-media ###

    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1691
    imagemagick_version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
    imagick_version: 3.7.0
    file_uploads: File uploads is turned off
    post_max_size: 512M
    upload_max_filesize: 512M
    max_effective_size: 512 MB
    max_file_uploads: 20
    imagick_limits:
    imagick::RESOURCETYPE_AREA: 122 MB
    imagick::RESOURCETYPE_DISK: 1073741824
    imagick::RESOURCETYPE_FILE: 6144
    imagick::RESOURCETYPE_MAP: 512 MB
    imagick::RESOURCETYPE_MEMORY: 256 MB
    imagick::RESOURCETYPE_THREAD: 1
    imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, WebP, BMP
    ghostscript_version: 9.53.3

    ### wp-server ###

    server_architecture: Linux 5.4.219-126.411.amzn2.x86_64 x86_64
    httpd_software: Apache/2.4.54 (Debian)
    php_version: 7.4.33 64bit
    php_sapi: apache2handler
    max_input_variables: 5000
    time_limit: 1800
    memory_limit: 512M
    max_input_time: 1000
    upload_max_filesize: 512M
    php_post_max_size: 512M
    curl_version: 7.74.0 OpenSSL/1.1.1n
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: true

    ### wp-database ###

    extension: mysqli
    server_version: 5.7.12-log
    client_version: mysqlnd 7.4.33
    max_allowed_packet: 4194304
    max_connections: 3000

    ### wp-constants ###

    WP_CONTENT_DIR: /var/strattic/site/public_html/wp-content
    WP_PLUGIN_DIR: /var/strattic/site/public_html/wp-content/plugins
    WP_MEMORY_LIMIT: 512M
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG: true
    WP_DEBUG_DISPLAY: false
    WP_DEBUG_LOG: true
    SCRIPT_DEBUG: false
    WP_CACHE: true
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined

    ### wp-filesystem ###

    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    mu-plugins: writable

    Thread Starter paradisiacxl

    (@paradisiacxl)

    Hey, thank you for the prompt answer!

    The mega menu module is indeed enabled, see here https://i.imgur.com/We2lH9S.png. It’s still not showing.

    Thread Starter paradisiacxl

    (@paradisiacxl)

    Looks like the issue is fixed!

Viewing 5 replies - 1 through 5 (of 5 total)