• Hi,

    Sinds kort treedt er een kritieke fout op wanneer de status van een order geüpdatet word naar afgerond. Nu vroeg ik me af of jullie een idee hebben waar de fout kan zitten. Aangezien er in de foutmelding staat dat de method WCPOST_Admin::get_tracktrace_shipments() undefined is. De foutmelding die ik via de mail kreeg is alsvolgt:

    Foutdetails
    ===========
    Een fout van het type E_ERROR werd veroorzaakt op regelnummer 44 van het bestand /var/www/nlbier-sabuniyah/wordpress/current/wp-content/themes/strauss/woocommerce/emails/customer-completed-renewal-order.php. Foutmelding: Uncaught Error: Call to undefined method WCPOST_Admin::get_tracktrace_shipments() in /var/www/nlbier-sabuniyah/wordpress/current/wp-content/themes/strauss/woocommerce/emails/customer-completed-renewal-order.php:44
    Stack trace:
    #0 /var/www/nlbier-sabuniyah/wordpress/current/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include()
    #1 /var/www/nlbier-sabuniyah/wordpress/current/wp-content/plugins/woocommerce/includes/wc-core-functions.php(364): wc_get_template('emails/customer...', Array, '', '/var/www/nlbier...')
    #2 /var/www/nlbier-sabuniyah/wordpress/current/wp-content/plugins/woocommerce-subscriptions/includes/emails/class-wcs-email-completed-renewal-order.php(146): wc_get_template_html('emails/customer...', Array, '', '/var/www/nlbier...')
    #3 /var/www/nlbier-sabuniyah/wordpress/current/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(541): WCS_Email_Completed_Renewal_Order->get_content_html()
    #4 /var/www/nlbier-sabuniyah/wordpress/current/wp-content/plugins/woocommerce-s

    En in regel 44 staat de volgende code:

    if ($trackTrace = WooCommerce_PostNL()->admin->get_tracktrace_shipments($order)) {
        $trackTrace = reset($trackTrace);
    
        ?>
    
        <h5 style="font-size: 16px; text-decoration: none; text-transform: uppercase; text-align: center; margin-top: 30px; margin-bottom: 30px; letter-spacing: 1px;">
            <a class="service-link" style="color: #5F021F!important; "
               href="<?= $trackTrace['tracktrace_url'] ?>"><?php the_field('email_shipped_track_button', 'option') ?></a>
        </h5>
    
        <?php
    }
    • This topic was modified 3 years, 8 months ago by Marianne.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Uncaught Error: Call to undefined method WCPOST_Admin::get_tracktrace_shipments’ is closed to new replies.