Support » Plugin: Advanced Shipment Tracking for WooCommerce » Custom text in ‘Delivered’ email

  • Resolved fitwarrior

    (@fitwarrior)


    With AST and TrackShip’s delivery reporting, I use the code below in functions.php to add a line to all woo emails.

    It works great for all email types (Processing, Shipped, etc) EXCEPT “Delivered” (nothing happens).

    ——————–

    add_action( ‘woocommerce_email_order_details’, ‘custom_email_order_details’, 10, 4 );

    function custom_email_order_details( $order, $sent_to_admin, $plain_text, $email ) {
    $order_id = method_exists( $order, ‘get_id’ ) ? $order->get_id() : $order->id;
    $pymt_proc_acct = get_post_meta( $order->get_order_number(), ‘pymt_proc_acct’, true );
    echo ‘<div>Your bank will show a charge from ‘.$pymt_proc_acct.'</div>’;
    }

    ——————–

    The email sent when status is set to “Delivered” appears to not utilize the same action hook.

    Any ideas on a low footprint way (no extra plugins) to embed a custom text into the Delivered email?

    thanks!

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter fitwarrior

    (@fitwarrior)

    I installed the update and looked at one of our multi-part shipment orders:

    https://photos.app.goo.gl/cfevKW4DYFvtfviz9

    The issue remains.

    Plugin Author zorem

    (@zorem)

    Hi, this issue was fixed, which version of the AST plguin are you using?

    Thread Starter fitwarrior

    (@fitwarrior)

    The latest version. My plugins always update automatically.

    Is the issue fixed for new orders going forward, or can customers with multi-part shipments from, say, a month ago see a correct view in My Account > Orders?

    Plugin Author zorem

    (@zorem)

    Hi, We just released the latest version of the AST plugin and fixed duplicate tracking number issue from a simple layout tracking display in My Account > Orders.

    Thread Starter fitwarrior

    (@fitwarrior)

    Good. It appears fixed.

    New issue in today’s error logs:

    [CRITICAL] : Uncaught Error: Cannot use object of type WP_Error as array in /home/##########/public_html/wp-content/plugins/woo-advanced-shipment-tracking/includes/class-wc-advanced-shipment-tracking-front.php:213
    Stack trace:
    #0 /home/##########/public_html/wp-includes/shortcodes.php(325): WC_Advanced_Shipment_Tracking_Front->woo_track_order_function('', '', 'wcast-track-ord...')
    #1 [internal function]: do_shortcode_tag(Array)
    #2 /home/##########/public_html/wp-includes/shortcodes.php(199): preg_replace_callback('/\\[(\\[?)(wcast\\...', 'do_shortcode_ta...', '[wcast-track-or...')
    #3 /home/##########/public_html/wp-includes/class-wp-hook.php(288): do_shortcode('[wcast-track-or...')
    #4 /home/sarmtech/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters('[wcast-track-or...', Array)
    #5 /home/##########/public_html/wp-includes/post-template.php(253): apply_filters('the_content', '[wcast-track-or...')
    #6 /home/##########/public_html/wp-content/themes/shopstudio/template-parts/content-page.php(19): the_content()

    I don’t know how or if this is creating a functionality issue but it’s worrisome any time there’s a ‘crititcal’ error.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Custom text in ‘Delivered’ email’ is closed to new replies.