{"id":28734,"date":"2014-04-04T20:13:24","date_gmt":"2014-04-04T20:13:24","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/woocommerce-order-product-count\/"},"modified":"2023-08-02T18:19:30","modified_gmt":"2023-08-02T18:19:30","slug":"woocommerce-order-product-count","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/woocommerce-order-product-count\/","author":12809760,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.0.0","stable_tag":"2.0.0","tested":"6.3.8","requires":"3.5.1","requires_php":"7.0","requires_plugins":null,"header_name":"WooCommerce Order Product Count","header_author":"David Jensen","header_description":"","assets_banners_color":"","last_updated":"2023-08-02 18:19:30","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/dkjensen.com","header_plugin_uri":"","header_author_uri":"https:\/\/dkjensen.com","rating":5,"author_block_rating":0,"active_installs":10,"downloads":3646,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1":{"tag":"1.1","author":"dkjensen","date":"2015-12-03 18:35:41"},"1.2":{"tag":"1.2","author":"dkjensen","date":"2016-06-25 21:11:51"},"1.3":{"tag":"1.3","author":"dkjensen","date":"2016-06-28 20:58:15"},"1.3.1":{"tag":"1.3.1","author":"dkjensen","date":"2018-12-29 19:25:54"},"1.3.2":{"tag":"1.3.2","author":"dkjensen","date":"2019-05-21 22:39:58"},"2.0.0":{"tag":"2.0.0","author":"dkjensen","date":"2023-08-02 18:19:30"}},"upgrade_notice":{"1.3.1":"<p>Fix compatibility with variable products<\/p>","1.3":"<p>Rewrite plugin to make it more extensible\nAdded several hooks for developers to modify, including modifying the columns displayed in the PDF<\/p>","1.2":"<p>Added support for WooCommerce 2.6<\/p>","1.1":"<p>Added support for variations\nAdded thumbnails<\/p>","1.0":"<p>Initial plugin state<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1","1.2","1.3","1.3.1","1.3.2","2.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":888427,"resolution":"1","location":"assets","locale":""},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":888427,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Bulk Action dropdown to export product count","2":"View of an example exported product count PDF"}},"plugin_section":[],"plugin_tags":[3236,1859,1896,1764,286],"plugin_category":[45,50,59],"plugin_contributors":[91372,165812],"plugin_business_model":[],"class_list":["post-28734","plugin","type-plugin","status-closed","hentry","plugin_tags-bulk","plugin_tags-export","plugin_tags-order","plugin_tags-pdf","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_category-media","plugin_category-utilities-and-tools","plugin_contributors-dkjensen","plugin_contributors-seattlewebco","plugin_committers-dkjensen"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/woocommerce-order-product-count.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/woocommerce-order-product-count\/assets\/screenshot-1.jpg?rev=888427","caption":"Bulk Action dropdown to export product count"},{"src":"https:\/\/ps.w.org\/woocommerce-order-product-count\/assets\/screenshot-2.jpg?rev=888427","caption":"View of an example exported product count PDF"}],"raw_content":"<!--section=description-->\n<p>For easy inventory gathering, generate a document with the quantity of each individual product in a neat PDF format.<\/p>\n\n<p><strong>How to use<\/strong>\nOn the WooCommerce Orders page, check each order you want to export the product count for, and then on the Bulk Actions drop down, select Orders Product Count and press Apply.<\/p>\n\n<p>A PDF document will then be generated with your orders product count.<\/p>\n\n<p><strong>Requirements<\/strong>\nWooCommerce 2.0 or later\nWordPress 7.0 or later<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>woocommerce-order-product-count<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20do%20i%20use%20the%20plugin%3F'><h3>How do I use the plugin?<\/h3><\/dt>\n<dd><p>On the WooCommerce Orders page, check each order you want to export the product count for, and then on the Bulk Actions drop down, select Orders Product Count and press Apply.<\/p>\n\n<p>A PDF document will then be generated with your orders product count.<\/p><\/dd>\n<dt id='how%20do%20i%20add%20a%20custom%20column%20to%20the%20exported%20pdf%3F'><h3>How do I add a custom column to the exported PDF?<\/h3><\/dt>\n<dd><p>Here is an example on how to display the product price in the PDF. Add the following to your theme functions.php file:<\/p>\n\n<pre><code>function wcopcpdf_columns( $columns ) {\n    \/\/ Remove the thumbnail column\n    unset( $columns['thumbnail'] );\n\n    \/\/ Add a column for product price\n    $columns['price'] = array(\n        'label' =&gt; 'Price',\n        'size'  =&gt; '15%',\n        'callback' =&gt; 'wcopcpdf_column_price' \/\/ Callback uses the function named below\n    );\n\n    return $columns;\n}\nadd_filter( 'wc_order_product_count_columns', 'wcopcpdf_columns' );\n\nif( ! function_exists( 'wcopcpdf_column_price' ) ) {\n    \/**\n    * Callback to display the product price\n    *     \n    * @param int $product_id\n    * @param int $quantity\n    * @param array $orders\n    * @param WC_Product $product\n    *\/\n    function wcopcpdf_column_price( $product_id, $quantity, $orders, $product ) {\n        return wc_price( $product-&gt;get_price() );   \n    }\n}\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>BREAKING: Refactor plugin for compatibility with WP 6.3 and PHP 8+<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>WordPress 5.2 compatibility<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Fix compatibility with variable products<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Rewrite plugin to make it more extensible<\/li>\n<li>Added several hooks for developers to modify, including modifying the columns displayed in the PDF<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Added support for WooCommerce 2.6<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added support for variations<\/li>\n<li>Added thumbnails<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial plugin state<\/li>\n<\/ul>","raw_excerpt":"Select WooCommerce orders in bulk to export the sum of each individual product.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/28734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=28734"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dkjensen"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=28734"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=28734"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=28734"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=28734"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=28734"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=28734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}