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
add_filter('preorder_avaiable_date_text',function($text , $id){ | |
$custom_date_format = date( 'D M d, Y', strtotime( get_post_meta($id, '_pre_order_date', true)) ); | |
return '<span class="preorder-avaiable-date-text">Available on '.$custom_date_format.'</span>'; | |
},10,2); |
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
add_filter('change_order_status_on_preorder_date','bp_change_order_status',20,1); | |
function bp_change_order_status($status){ | |
return 'processing'; | |
} |
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
/** | |
* How to edit or override the email templates for custom order status? | |
* @link https://brightplugins.com/docs/how-to-edit-or-override-the-email-templates-for-custom-order-status/ | |
*/ | |
add_action( 'woocommerce_email_before_order_table', 'brightplugins_add_content_specific_email', 20, 4 ); | |
function brightplugins_add_content_specific_email( $order, $sent_to_admin, $plain_text, $email ) { | |
if ( $email->id == 'bvos_custom_transit' ) { | |
echo '<p>Content for Transit Status</p>'; |
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
/** | |
* https://brightplugins.com/docs/how-to-edit-or-override-the-email-templates-for-custom-order-status/ | |
*/ | |
add_filter( 'viwec_accept_email_type', function ($email_types) { | |
$email_types[] = 'bvos_custom_pickup-point'; // replace it | |
return $email_types; | |
}, 9999 ); | |
function register_email_type( $emails ) { |
OlderNewer