Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AshlinRejo/0e555ea10d3c9e4967d8b5b65696d6c9 to your computer and use it in GitHub Desktop.
Save AshlinRejo/0e555ea10d3c9e4967d8b5b65696d6c9 to your computer and use it in GitHub Desktop.
Custom code for Email customizer - woocommerce-local-pickup-time-select
<?php
/**
* Custom code shortcode
*
* This template can be overridden by copying it to yourtheme/plugin-folder-name/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;
}
$key = 'pickup_time';//Field name
if(isset($attr['type']) && $attr['type'] == $key){
do_action( 'woocommerce_admin_order_data_after_billing_address', $order );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment