Title: run function after checkout itens load
Last modified: May 16, 2020

---

# run function after checkout itens load

 *  Resolved [fpacheco1](https://wordpress.org/support/users/fpacheco1/)
 * (@fpacheco1)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/run-function-after-checkout-itens-load/)
 * Hi´
    Thanks for the great plugin I need to load this function in order for the
   facybox plugin to read some elements shown on the checkout page. Where could 
   I place it in your plugin?
 * REgards

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

 *  Plugin Author [Rupinder Kaur](https://wordpress.org/support/users/coolcoders/)
 * (@coolcoders)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/run-function-after-checkout-itens-load/#post-12847602)
 * Hi [@fpacheco1](https://wordpress.org/support/users/fpacheco1/),
 * I am not sure what your actual requirement is, Can you please elaborate your 
   situation
    in detail.
 * Thanks
 *  Thread Starter [fpacheco1](https://wordpress.org/support/users/fpacheco1/)
 * (@fpacheco1)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/run-function-after-checkout-itens-load/#post-12847722)
 * Hi
    I have a plugin where the client uploads image file and they show up on the
   checkout page inside a  
   . (ORANGE ARROW IN IMAGE: [https://pasteboard.co/J8NcPv6.jpg](https://pasteboard.co/J8NcPv6.jpg))
   
   I want that image to open with the easy fancybox plugin but as it is loaded after
   the easy fancybox plugin reads the elements it does not work. I need to run this
   code somewhere on your script (after the checkout content is loaded) in order
   for the easy fancybox to work: $(document).trigger(‘post-load’);
 * Many thanks
 *  Plugin Author [Rupinder Kaur](https://wordpress.org/support/users/coolcoders/)
 * (@coolcoders)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/run-function-after-checkout-itens-load/#post-12847776)
 * OK, well you can prefer the “update_checkout” function to make it work. Using
   this plugin we are updating checkout on page load and every time users change
   the quantity.
    you can see this script on line-no 269 in “plugin’s main file”.
 * You can try adding your data here or can prefer adding scripts externally.
    Hope
   this helps.
 * Thanks
 *  Thread Starter [fpacheco1](https://wordpress.org/support/users/fpacheco1/)
 * (@fpacheco1)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/run-function-after-checkout-itens-load/#post-12847844)
 * Perfect
    it worked line 330 of woocommerce-one-page-checkout-and-layouts.php
 * jQuery.post( ‘<?php echo $admin_url; ?>’ + ‘admin-ajax.php’, data, function( 
   response )
    {
 *  // alert(response);
 *  jQuery(‘#order_review_table’).html();
 *  jQuery(‘#order_review_table’).html(response);
    jQuery(document).trigger(‘post-
   load’); //(‘#order_review_table’).html(response); });
 *  Plugin Author [Rupinder Kaur](https://wordpress.org/support/users/coolcoders/)
 * (@coolcoders)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/run-function-after-checkout-itens-load/#post-12848339)
 * Perfect, Glad that worked for you.

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

The topic ‘run function after checkout itens load’ is closed to new replies.

 * ![](https://ps.w.org/custom-checkout-layouts-for-woocommerce/assets/icon-256x256.
   jpg?rev=2079391)
 * [One page checkout and layouts for woocommerce](https://wordpress.org/plugins/custom-checkout-layouts-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-checkout-layouts-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-checkout-layouts-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-checkout-layouts-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-checkout-layouts-for-woocommerce/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Rupinder Kaur](https://wordpress.org/support/users/coolcoders/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/run-function-after-checkout-itens-load/#post-12848339)
 * Status: resolved