Title: PHP Help
Last modified: July 29, 2020

---

# PHP Help

 *  Resolved [rfreshd](https://wordpress.org/support/users/rfreshd/)
 * (@rfreshd)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/php-help-24/)
 * I’m looking to add some extra PHP into the order-handler.php file so that the
   order date and timeslot booked appears on the receipt, the plugin that I am using
   for this has this documentation on adding the functionality into another plugin
   for printing so I’m not too sure if this will work for the star cloudprnt plugin?
 * Docs for the other plugin;
 * [https://docs.iconicwp.com/article/53-get-the-delivery-date-for-an-order](https://docs.iconicwp.com/article/53-get-the-delivery-date-for-an-order)
   
   [https://docs.iconicwp.com/article/260-add-delivery-date-and-time-to-print-invoice-delivery-notes-for-woocommerce-by-tyche-softwares](https://docs.iconicwp.com/article/260-add-delivery-date-and-time-to-print-invoice-delivery-notes-for-woocommerce-by-tyche-softwares)
   [https://docs.iconicwp.com/article/257-add-delivery-date-and-time-to-woocommerce-print-invoices-packing-lists-by-skyverge](https://docs.iconicwp.com/article/257-add-delivery-date-and-time-to-woocommerce-print-invoices-packing-lists-by-skyverge)
 * My PHP knowledge is only extremely limited so I’m not sure where I would need
   to implement the code to the order-handler.php file and if any of the PHP code
   from the other plugin would work?
 * Any help with this would be extremely appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [lawrenceowen](https://wordpress.org/support/users/lawrenceowen/)
 * (@lawrenceowen)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/php-help-24/#post-13189802)
 * [@rfreshd](https://wordpress.org/support/users/rfreshd/)
 * Hi, yes this _should_ be straightforward thankfully, since their docs are good.
   
   I can’t test directly, since I don’t have their plugin here, but the following
   code should work:
 *     ```
       $del_date = $order->get_meta( 'jckwds_date' );
       $del_time_slot = $order->get_meta( 'jckwds_timeslot' );
       $del_timestamp = $order->get_meta( 'jckwds_timestamp' );
   
       $printer->add_text_line("Delivery Date: ".$del_date);
       $printer->add_text_line("Delivery Time Slot: ".$del_time_slot);
       $printer->add_text_line("Timestamp: ".$del_timestamp);
       $printer->add_new_line(1);
       ```
   
 * This can be added to order-handler.php, in the function named `star_cloudprnt_print_order_summary(
   $selectedPrinter, $file, $order_id)` which I think you should find at around 
   line 188.
 * I would recommends adding this either above or below the line that contains `
   star_cloudprnt_create_address($order, $order_meta, $printer);` depending on where
   you would like it to be printed on the receipt. Of if you prefer to print the
   delivery slot info before the item list, then place the code before the line 
   that contains `star_cloudprnt_create_receipt_items($order, $printer, $selectedPrinter['
   columns']);`.
 * I hope that this helps, but I can see that you are in the UK, which means that
   you can get more direct support from the EMEA office via [support@star-emea.com](https://wordpress.org/support/topic/php-help-24/support@star-emea.com?output_format=md)
   if you need further assistance (i.e. a screen share etc.).
 *  Thread Starter [rfreshd](https://wordpress.org/support/users/rfreshd/)
 * (@rfreshd)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/php-help-24/#post-13195708)
 * This is great, thank you so much for your help! My client hasn’t received the
   printer yet but once they do I’ll test and let you know how it works for future
   reference should anyone else require the same info.
 * Thanks again,
    Jessica
 *  Plugin Contributor [lawrenceowen](https://wordpress.org/support/users/lawrenceowen/)
 * (@lawrenceowen)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/php-help-24/#post-13212643)
 * [@rfreshd](https://wordpress.org/support/users/rfreshd/) Hi Jessica,
 * Really glad that we could help.
    Feel free to get in touch if you have any difficulties
   when your client receives their printer.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Help’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/star-cloudprnt-for-woocommerce_b4cfd9.
   svg)
 * [Star CloudPRNT for WooCommerce](https://wordpress.org/plugins/star-cloudprnt-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/star-cloudprnt-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/star-cloudprnt-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/star-cloudprnt-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/star-cloudprnt-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/star-cloudprnt-for-woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [lawrenceowen](https://wordpress.org/support/users/lawrenceowen/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/php-help-24/#post-13212643)
 * Status: resolved