Created
March 5, 2019 17:07
-
-
Save renjith-ph/2a6abf559b0694e23b7d7272afd5150d 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 Shipment Tracking Pro - https://www.pluginhive.com/product/woocommerce-shipment-tracking-pro/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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_fetch_shipment_tracking_details', $order ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps -