Skip to content

Instantly share code, notes, and snippets.

@varun-pluginhive
Last active November 30, 2018 10:57
Show Gist options
  • Select an option

  • Save varun-pluginhive/5faff1a88f5e16c6c81ee823e23396b1 to your computer and use it in GitHub Desktop.

Select an option

Save varun-pluginhive/5faff1a88f5e16c6c81ee823e23396b1 to your computer and use it in GitHub Desktop.
Template to attach shipment tracking number in WooCommerce Email Customizer with Drag and Drop Email Builder. WooCommerce FedEx Shipping Plugin with Print Label - https://www.pluginhive.com/product/woocommerce-fedex-shipping-plugin-with-print-label/
<?php
/**
* Custom code shortcode
*
* This template can be overridden by copying it to yourtheme/woocommerce_email_cuztomizer_with_drag_and_drop_builder/woo_mail/custom_code.php.
* @var $order WooCommerce order
* @var $email_id WooCommerce email id (new_order, cancelled_order)
* @var $sent_to_admin WooCommerce email send to admin
* @var $plain_text WooCommerce email format
* @var $email WooCommerce email object
* @var $attr array custom code attributes
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// To include woocommerce shipment tracking details in email sent for order. Link -https://www.flycart.org/products/wordpress/woocommerce-email-customizer
// Shortcode [woo_mb_custom_code type="ph_fst"]
if(isset($attr['type']) && $attr['type'] == 'ph_fst'){
do_action( 'ph_fedex_fetch_shipment_tracking_details', $order );
}
@varun-pluginhive

varun-pluginhive commented Nov 16, 2018

Copy link
Copy Markdown
Author

Steps -

  1. Place the above code in yourtheme/woocommerce_email_cuztomizer_with_drag_and_drop_builder/woo_mail/custom_code.php
  2. Use [woo_mb_custom_code type="ph_fst"] as shortcode

@varun-pluginhive

Copy link
Copy Markdown
Author

Require Fedex Plugin - 4.1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment