Title: sanderwit's Replies | WordPress.org

---

# sanderwit

  [  ](https://wordpress.org/support/users/sanderwit/)

 *   [Profile](https://wordpress.org/support/users/sanderwit/)
 *   [Topics Started](https://wordpress.org/support/users/sanderwit/topics/)
 *   [Replies Created](https://wordpress.org/support/users/sanderwit/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/sanderwit/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/sanderwit/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/sanderwit/engagements/)
 *   [Favorites](https://wordpress.org/support/users/sanderwit/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed YouTube Block - Fast Loading Videos, Shorts & Playlists] Aspect ratio](https://wordpress.org/support/topic/aspect-ratio-22/)
 *  Thread Starter [sanderwit](https://wordpress.org/support/users/sanderwit/)
 * (@sanderwit)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/aspect-ratio-22/#post-17319601)
 * Awesome, great work Phi! I’ll try it out, thanks for the message.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Product Input Fields for WooCommerce] Get Custom Field Value in code](https://wordpress.org/support/topic/get-custom-field-value-in-code/)
 *  [sanderwit](https://wordpress.org/support/users/sanderwit/)
 * (@sanderwit)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/get-custom-field-value-in-code/#post-15032433)
 * I am having a similar issue since the latest update. I used to be able to use
   this code to retrieve the global field data on the cart page, but no longer.
 *     ```
       add_action( 'woocommerce_before_calculate_totals', 'getcustomfield', 10, 1 );
       function getcustomfield( $cart ) {
           foreach ( $cart->get_cart() as $cart_item ) {
               $customfield = $cart_item['alg_wc_pif_global'][0]['_value'];
           }
       }
       ```
   
 * I tried using print_r($cart_item[‘alg_wc_pif_global’]); to find the _value field
   but it seems to be gone. I also tried using ‘alg_wc_pif_global_1’ and all other
   variations, but without success. Can anybody help?
 * I am having the same issue with the ‘alg_wc_pif_local’ field, since the latest
   update.
    -  This reply was modified 4 years, 8 months ago by [sanderwit](https://wordpress.org/support/users/sanderwit/).

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