Output a product custom field in WooCommerce Order Admin Page (ACF)Show ACF field value on edit order page WooCommerceHow to edit woocommerce admin order page?Add columns to admin orders list in WooCommerce backendAdd Advanced Custom Fields to WooCommerce Product VariationWooCommerce : Add custom Metabox to admin order pageWooCommerce - Hide shipping address when local pickup is chosen on thankyou pageCustomizing order completed email notification: Displaying product custom fieldHow to Add Advanced Custom Fields to a Product VariationUnable to edit ACF field on WooCommerce product categoryDisplay Products Shipping Classes in WooCommerce order edit pageWooCommerce: Custom Template for Grouped / Bundled Products

2.8 Why are collections grayed out? How can I open them?

New brakes for 90s road bike

Store Credit Card Information in Password Manager?

Lowest total scrabble score

How much character growth crosses the line into breaking the character

Why Shazam when there is already Superman?

Pre-mixing cryogenic fuels and using only one fuel tank

Not using 's' for he/she/it

Open a doc from terminal, but not by its name

Creepy dinosaur pc game identification

Symbol used to indicate indivisibility

Is it safe to use olive oil to clean the ear wax?

If infinitesimal transformations commute why dont the generators of the Lorentz group commute?

What does chmod -u do?

Is it possible to have a strip of cold climate in the middle of a planet?

Does Doodling or Improvising on the Piano Have Any Benefits?

How to explain what's wrong with this application of the chain rule?

Travelling outside the UK without a passport

Did arcade monitors have same pixel aspect ratio as TV sets?

What percentage of fillings performed today are done with mercury amalgam?

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?

How did Rebekah know that Esau was planning to kill his brother in Genesis 27:42?

Is there a RAID 0 Equivalent for RAM?

Removing files under particular conditions (number of files, file age)



Output a product custom field in WooCommerce Order Admin Page (ACF)


Show ACF field value on edit order page WooCommerceHow to edit woocommerce admin order page?Add columns to admin orders list in WooCommerce backendAdd Advanced Custom Fields to WooCommerce Product VariationWooCommerce : Add custom Metabox to admin order pageWooCommerce - Hide shipping address when local pickup is chosen on thankyou pageCustomizing order completed email notification: Displaying product custom fieldHow to Add Advanced Custom Fields to a Product VariationUnable to edit ACF field on WooCommerce product categoryDisplay Products Shipping Classes in WooCommerce order edit pageWooCommerce: Custom Template for Grouped / Bundled Products













1















With WooCommerce, I'm using the Advanced Custom Fields plugin to keep a track of where I physically store each product.



When an order comes in, I want to be able to look at the admin edit order page and see where the items are stored. So I can grab it to ship.



Here's a picture of what I want to see:



Order Page Example



Hopefully, it makes sense.



I just want to recall the individual product ACF variable (BinLocation) for each product on the Edit Order Admin Page for Wordpress. Any help on this?



Thanks.










share|improve this question




























    1















    With WooCommerce, I'm using the Advanced Custom Fields plugin to keep a track of where I physically store each product.



    When an order comes in, I want to be able to look at the admin edit order page and see where the items are stored. So I can grab it to ship.



    Here's a picture of what I want to see:



    Order Page Example



    Hopefully, it makes sense.



    I just want to recall the individual product ACF variable (BinLocation) for each product on the Edit Order Admin Page for Wordpress. Any help on this?



    Thanks.










    share|improve this question


























      1












      1








      1


      2






      With WooCommerce, I'm using the Advanced Custom Fields plugin to keep a track of where I physically store each product.



      When an order comes in, I want to be able to look at the admin edit order page and see where the items are stored. So I can grab it to ship.



      Here's a picture of what I want to see:



      Order Page Example



      Hopefully, it makes sense.



      I just want to recall the individual product ACF variable (BinLocation) for each product on the Edit Order Admin Page for Wordpress. Any help on this?



      Thanks.










      share|improve this question
















      With WooCommerce, I'm using the Advanced Custom Fields plugin to keep a track of where I physically store each product.



      When an order comes in, I want to be able to look at the admin edit order page and see where the items are stored. So I can grab it to ship.



      Here's a picture of what I want to see:



      Order Page Example



      Hopefully, it makes sense.



      I just want to recall the individual product ACF variable (BinLocation) for each product on the Edit Order Admin Page for Wordpress. Any help on this?



      Thanks.







      php wordpress woocommerce advanced-custom-fields orders






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 12 '17 at 18:36









      LoicTheAztec

      94.3k1368108




      94.3k1368108










      asked Jul 9 '17 at 21:52









      ChristianChristian

      84




      84






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Updated: Using a custom function hoocked in woocommerce_before_order_itemmeta action hook, you will be able to achieve what you are looking for:



          add_action( 'woocommerce_before_order_itemmeta', 'storage_location_of_order_items', 10, 3 );
          function storage_location_of_order_items( $item_id, $item, $product )
          // Only on backend order edit pages
          if( ! ( is_admin() && $item->is_type('line_item') ) ) return;

          // Get your ACF product value (replace the slug by yours below)
          if( $acf_value = get_field( 'BinLocation', $product->get_id() ) )
          $acf_label = __('Stored in: ');

          // Outputing the value of the "location storage" for this product item
          echo '<div class="wc-order-item-custom"><strong>' . $acf_value . $acf_label . '</strong></div>';




          Code goes in any php file of your active child theme (or theme) or also in any plugin php file.



          This code is tested and works in WooCommerce version 3 and up…








          share|improve this answer

























          • Exactly what I was looking for, thank you so much!

            – Christian
            Jul 11 '17 at 4:30











          • Hello , in wc 3.5 this doesnt seem to work , it displays the field but then stops rendering the rest of the order info , shipping and totals ? any ideas ?

            – John Athanasiou
            Jan 12 at 9:16










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45001375%2foutput-a-product-custom-field-in-woocommerce-order-admin-page-acf%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Updated: Using a custom function hoocked in woocommerce_before_order_itemmeta action hook, you will be able to achieve what you are looking for:



          add_action( 'woocommerce_before_order_itemmeta', 'storage_location_of_order_items', 10, 3 );
          function storage_location_of_order_items( $item_id, $item, $product )
          // Only on backend order edit pages
          if( ! ( is_admin() && $item->is_type('line_item') ) ) return;

          // Get your ACF product value (replace the slug by yours below)
          if( $acf_value = get_field( 'BinLocation', $product->get_id() ) )
          $acf_label = __('Stored in: ');

          // Outputing the value of the "location storage" for this product item
          echo '<div class="wc-order-item-custom"><strong>' . $acf_value . $acf_label . '</strong></div>';




          Code goes in any php file of your active child theme (or theme) or also in any plugin php file.



          This code is tested and works in WooCommerce version 3 and up…








          share|improve this answer

























          • Exactly what I was looking for, thank you so much!

            – Christian
            Jul 11 '17 at 4:30











          • Hello , in wc 3.5 this doesnt seem to work , it displays the field but then stops rendering the rest of the order info , shipping and totals ? any ideas ?

            – John Athanasiou
            Jan 12 at 9:16















          0














          Updated: Using a custom function hoocked in woocommerce_before_order_itemmeta action hook, you will be able to achieve what you are looking for:



          add_action( 'woocommerce_before_order_itemmeta', 'storage_location_of_order_items', 10, 3 );
          function storage_location_of_order_items( $item_id, $item, $product )
          // Only on backend order edit pages
          if( ! ( is_admin() && $item->is_type('line_item') ) ) return;

          // Get your ACF product value (replace the slug by yours below)
          if( $acf_value = get_field( 'BinLocation', $product->get_id() ) )
          $acf_label = __('Stored in: ');

          // Outputing the value of the "location storage" for this product item
          echo '<div class="wc-order-item-custom"><strong>' . $acf_value . $acf_label . '</strong></div>';




          Code goes in any php file of your active child theme (or theme) or also in any plugin php file.



          This code is tested and works in WooCommerce version 3 and up…








          share|improve this answer

























          • Exactly what I was looking for, thank you so much!

            – Christian
            Jul 11 '17 at 4:30











          • Hello , in wc 3.5 this doesnt seem to work , it displays the field but then stops rendering the rest of the order info , shipping and totals ? any ideas ?

            – John Athanasiou
            Jan 12 at 9:16













          0












          0








          0







          Updated: Using a custom function hoocked in woocommerce_before_order_itemmeta action hook, you will be able to achieve what you are looking for:



          add_action( 'woocommerce_before_order_itemmeta', 'storage_location_of_order_items', 10, 3 );
          function storage_location_of_order_items( $item_id, $item, $product )
          // Only on backend order edit pages
          if( ! ( is_admin() && $item->is_type('line_item') ) ) return;

          // Get your ACF product value (replace the slug by yours below)
          if( $acf_value = get_field( 'BinLocation', $product->get_id() ) )
          $acf_label = __('Stored in: ');

          // Outputing the value of the "location storage" for this product item
          echo '<div class="wc-order-item-custom"><strong>' . $acf_value . $acf_label . '</strong></div>';




          Code goes in any php file of your active child theme (or theme) or also in any plugin php file.



          This code is tested and works in WooCommerce version 3 and up…








          share|improve this answer















          Updated: Using a custom function hoocked in woocommerce_before_order_itemmeta action hook, you will be able to achieve what you are looking for:



          add_action( 'woocommerce_before_order_itemmeta', 'storage_location_of_order_items', 10, 3 );
          function storage_location_of_order_items( $item_id, $item, $product )
          // Only on backend order edit pages
          if( ! ( is_admin() && $item->is_type('line_item') ) ) return;

          // Get your ACF product value (replace the slug by yours below)
          if( $acf_value = get_field( 'BinLocation', $product->get_id() ) )
          $acf_label = __('Stored in: ');

          // Outputing the value of the "location storage" for this product item
          echo '<div class="wc-order-item-custom"><strong>' . $acf_value . $acf_label . '</strong></div>';




          Code goes in any php file of your active child theme (or theme) or also in any plugin php file.



          This code is tested and works in WooCommerce version 3 and up…









          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 14 at 17:11

























          answered Jul 10 '17 at 2:49









          LoicTheAztecLoicTheAztec

          94.3k1368108




          94.3k1368108












          • Exactly what I was looking for, thank you so much!

            – Christian
            Jul 11 '17 at 4:30











          • Hello , in wc 3.5 this doesnt seem to work , it displays the field but then stops rendering the rest of the order info , shipping and totals ? any ideas ?

            – John Athanasiou
            Jan 12 at 9:16

















          • Exactly what I was looking for, thank you so much!

            – Christian
            Jul 11 '17 at 4:30











          • Hello , in wc 3.5 this doesnt seem to work , it displays the field but then stops rendering the rest of the order info , shipping and totals ? any ideas ?

            – John Athanasiou
            Jan 12 at 9:16
















          Exactly what I was looking for, thank you so much!

          – Christian
          Jul 11 '17 at 4:30





          Exactly what I was looking for, thank you so much!

          – Christian
          Jul 11 '17 at 4:30













          Hello , in wc 3.5 this doesnt seem to work , it displays the field but then stops rendering the rest of the order info , shipping and totals ? any ideas ?

          – John Athanasiou
          Jan 12 at 9:16





          Hello , in wc 3.5 this doesnt seem to work , it displays the field but then stops rendering the rest of the order info , shipping and totals ? any ideas ?

          – John Athanasiou
          Jan 12 at 9:16



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45001375%2foutput-a-product-custom-field-in-woocommerce-order-admin-page-acf%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해