hook to pdf file. error after update to latest version
-
I use the following code to add a hook to the pdf file. with the version 1.3.1. It worked good. but after update your plugin to the latest version, the time doesn’t display correct. just some numbers. I know you have change the time display after 1.31 because some bug in display time in 1.3.1. so I update the latest version 1.3.12 but the time display not working now. Please help. Thank you.
//add pickup time to the pdf file in local pickup time select 1.3.1 version
add_action( ‘wpo_wcpdf_after_order_data’, ‘wpo_wcpdf_pickup_time’, 10, 2 );
function wpo_wcpdf_pickup_time ($template_type, $order) {
$order_meta = get_post_custom( $order->id );
$value = $order_meta[‘_local_pickup_time_select’][0];
$value = preg_replace(‘/(\d)_(\d)/’,’$1:$2′, $value);
$value = explode(‘_’, $value);
$time = __( $value[0], ‘woocommerce-local-pickup-time’ ). ‘ ‘ .$value[1];
echo ‘<p>‘ . __( ‘Time Choose: ‘, ‘woocommerce-local-pickup-time’ ) . ‘ ‘ . $time . ‘</p>’;
}
- The topic ‘hook to pdf file. error after update to latest version’ is closed to new replies.