Created
May 30, 2023 01:56
-
-
Save zackeryfretty/c2930226566f8615f69fc4b9c9180a99 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function zf_sequential_order_yaymail_shortcode( $shortcode_list, $yaymail_informations, $args = array() ) { | |
// Real Order Lookup | |
if (isset ($args['order'])) { | |
$order = $args['order']; | |
$order_id = $order->get_order_number(); | |
return $order_id; | |
} | |
// YayMail Preview | |
return 'PRE_XXXX'; | |
} | |
add_filter( | |
'yaymail_customs_shortcode', | |
function( $shortcode_list, $yaymail_informations, $args = array() ) { | |
$shortcode_list['[yaymail_custom_shortcode_sequential_order_number]'] = zf_sequential_order_yaymail_shortcode($shortcode_list, $yaymail_informations, $args); | |
return $shortcode_list; | |
}, | |
10, | |
3 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment