{"id":98318,"date":"2019-02-20T16:47:46","date_gmt":"2019-02-20T16:47:46","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wc-cart-pdf\/"},"modified":"2025-08-05T14:32:08","modified_gmt":"2025-08-05T14:32:08","slug":"wc-cart-pdf","status":"publish","type":"plugin","link":"https:\/\/sq.wordpress.org\/plugins\/wc-cart-pdf\/","author":20202104,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"3.2.0","stable_tag":"3.2.0","tested":"6.8.5","requires":"6.2","requires_php":"8.0.0","requires_plugins":null,"header_name":"Cart PDF for WooCommerce","header_author":"CloudCatch LLC","header_description":"Allows customers to download their cart as a PDF","assets_banners_color":"","last_updated":"2025-08-05 14:32:08","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/cloudcatch.io","rating":5,"author_block_rating":5,"active_installs":1000,"downloads":32651,"num_ratings":25,"support_threads":2,"support_threads_resolved":1,"author_block_count":1,"sections":["description","installation","faq","changelog"],"tags":{"1.0.2":{"tag":"1.0.2","author":"seattlewebco","date":"2019-02-20 16:47:25"},"1.0.3":{"tag":"1.0.3","author":"dkjensen","date":"2019-03-13 18:35:38"},"1.0.4":{"tag":"1.0.4","author":"dkjensen","date":"2019-05-21 22:44:03"},"1.0.5":{"tag":"1.0.5","author":"dkjensen","date":"2019-08-12 17:19:58"},"2.0.0":{"tag":"2.0.0","author":"dkjensen","date":"2019-10-15 16:49:03"},"2.0.1":{"tag":"2.0.1","author":"dkjensen","date":"2019-10-16 16:08:06"},"2.0.2":{"tag":"2.0.2","author":"dkjensen","date":"2019-11-06 15:11:59"},"2.0.3":{"tag":"2.0.3","author":"dkjensen","date":"2019-11-07 16:31:34"},"2.0.4":{"tag":"2.0.4","author":"dkjensen","date":"2019-11-13 17:03:11"},"2.0.5":{"tag":"2.0.5","author":"dkjensen","date":"2020-03-06 23:10:36"},"2.0.6":{"tag":"2.0.6","author":"dkjensen","date":"2020-04-10 22:48:27"},"2.1.0":{"tag":"2.1.0","author":"dkjensen","date":"2021-02-09 20:13:53"},"2.1.1":{"tag":"2.1.1","author":"dkjensen","date":"2021-02-09 20:57:35"},"2.1.2":{"tag":"2.1.2","author":"dkjensen","date":"2021-02-18 21:35:32"},"2.1.3":{"tag":"2.1.3","author":"dkjensen","date":"2021-07-08 12:00:59"},"2.1.4":{"tag":"2.1.4","author":"dkjensen","date":"2021-08-01 19:05:12"},"2.1.5":{"tag":"2.1.5","author":"dkjensen","date":"2021-08-02 11:19:22"},"2.1.6":{"tag":"2.1.6","author":"dkjensen","date":"2021-08-17 10:03:13"},"2.1.7":{"tag":"2.1.7","author":"dkjensen","date":"2021-08-28 15:04:37"},"2.10.0":{"tag":"2.10.0","author":"dkjensen","date":"2024-09-06 20:04:23"},"2.2.0":{"tag":"2.2.0","author":"dkjensen","date":"2021-10-25 10:50:56"},"2.2.1":{"tag":"2.2.1","author":"dkjensen","date":"2022-04-27 19:46:53"},"2.2.2":{"tag":"2.2.2","author":"dkjensen","date":"2022-10-20 11:45:35"},"2.2.3":{"tag":"2.2.3","author":"dkjensen","date":"2022-10-20 11:57:03"},"2.3.0":{"tag":"2.3.0","author":"dkjensen","date":"2022-10-31 15:04:10"},"2.3.1":{"tag":"2.3.1","author":"dkjensen","date":"2023-07-29 14:02:10"},"2.4.0":{"tag":"2.4.0","author":"dkjensen","date":"2023-08-18 12:36:48"},"2.5.0":{"tag":"2.5.0","author":"dkjensen","date":"2023-11-03 11:29:21"},"2.6.0":{"tag":"2.6.0","author":"dkjensen","date":"2023-11-07 17:21:01"},"2.7.0":{"tag":"2.7.0","author":"dkjensen","date":"2023-11-22 21:48:38"},"2.8.0":{"tag":"2.8.0","author":"dkjensen","date":"2024-03-11 13:45:52"},"2.9.0":{"tag":"2.9.0","author":"dkjensen","date":"2024-03-21 11:52:29"},"2.9.1":{"tag":"2.9.1","author":"dkjensen","date":"2024-03-24 19:48:28"},"2.9.2":{"tag":"2.9.2","author":"dkjensen","date":"2024-06-26 11:38:29"},"2.9.3":{"tag":"2.9.3","author":"dkjensen","date":"2024-07-23 17:11:32"},"2.9.4":{"tag":"2.9.4","author":"dkjensen","date":"2024-08-29 11:01:00"},"3.0.0":{"tag":"3.0.0","author":"dkjensen","date":"2024-09-13 10:49:39"},"3.0.1":{"tag":"3.0.1","author":"dkjensen","date":"2024-09-17 19:24:04"},"3.0.2":{"tag":"3.0.2","author":"dkjensen","date":"2024-10-08 18:11:36"},"3.1.0":{"tag":"3.1.0","author":"dkjensen","date":"2024-11-21 17:11:04"},"3.1.1":{"tag":"3.1.1","author":"dkjensen","date":"2024-12-17 20:52:53"},"3.1.2":{"tag":"3.1.2","author":"dkjensen","date":"2025-07-17 16:39:19"},"3.2.0":{"tag":"3.2.0","author":"dkjensen","date":"2025-08-05 14:32:08"}},"upgrade_notice":{"":"<p>2.0.0\n* PDF generation library changed from Dompdf to mPDF\n* Requires PHP &gt;= 5.6.0<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":25},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3339735,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3339735,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":{"wc-cart-button\/cart-pdf-button":{"$schema":"https:\/\/schemas.wp.org\/trunk\/block.json","apiVersion":3,"name":"wc-cart-button\/cart-pdf-button","title":"Cart PDF Button","category":"design","description":"Download WooCommerce cart as PDF.","keywords":["button","cart","pdf"],"textdomain":"wc-cart-pdf","attributes":{"text":{"type":"string","source":"html","selector":"a","role":"content","default":"Download Cart as PDF"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"splitting":true,"align":false,"alignWide":false,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"reusable":false,"shadow":true,"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalSelector":".wp-block-wc-cart-button-cart-pdf-button .cart-pdf-button"},"editorScript":"file:.\/blocks.js","style":["file:.\/blocks.css"]}},"tagged_versions":["1.0.2","1.0.3","1.0.4","1.0.5","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6","2.1.0","2.1.1","2.1.2","2.1.3","2.1.4","2.1.5","2.1.6","2.1.7","2.10.0","2.2.0","2.2.1","2.2.2","2.2.3","2.3.0","2.3.1","2.4.0","2.5.0","2.6.0","2.7.0","2.8.0","2.9.0","2.9.1","2.9.2","2.9.3","2.9.4","3.0.0","3.0.1","3.0.2","3.1.0","3.1.1","3.1.2","3.2.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":3339735,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3049171,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Preview of an example PDF generated from the WooCommerce Cart","2":"Customizer settings"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[209280,131625,91372,190536,165812],"plugin_business_model":[],"class_list":["post-98318","plugin","type-plugin","status-publish","hentry","plugin_contributors-cloudcatch","plugin_contributors-davidperez","plugin_contributors-dkjensen","plugin_contributors-exstheme","plugin_contributors-seattlewebco","plugin_committers-cloudcatch","plugin_committers-dkjensen","plugin_committers-seattlewebco","plugin_support_reps-cloudcatch","plugin_support_reps-dkjensen"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wc-cart-pdf\/assets\/icon-128x128.png?rev=3339735","icon_2x":"https:\/\/ps.w.org\/wc-cart-pdf\/assets\/icon-256x256.png?rev=3339735","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wc-cart-pdf\/assets\/screenshot-1.jpg?rev=3339735","caption":"Preview of an example PDF generated from the WooCommerce Cart"},{"src":"https:\/\/ps.w.org\/wc-cart-pdf\/assets\/screenshot-2.png?rev=3049171","caption":"Customizer settings"}],"raw_content":"<!--section=description-->\n<p>Adds ability for users and guests to download their WooCommerce cart as PDF. Useful for many cases such as if a user needs a quote before completing purchase.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Full PDF template customization<\/li>\n<li>Send copy of each generated cart PDF to admin<\/li>\n<li>Capture customer \/ guest information from checkout and display on generated PDF<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload plugin and then activate<\/li>\n<li>Ensure WooCommerce is installed and activated as well<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20to%20view%20or%20open%20pdf%20instead%20of%20download%3F'><h3>How to view or open PDF instead of download?<\/h3><\/dt>\n<dd><p>Add the following code snippet to your themes functions.php:<\/p>\n\n<pre><code>function child_theme_wc_cart_pdf_destination( $dest ) {\n    if ( class_exists( '\\WCCartPDF\\Mpdf\\Output\\Destination' ) ) {\n        $dest = \\WCCartPDF\\Mpdf\\Output\\Destination::INLINE;\n    }\n\n    return $dest;\n}\nadd_filter( 'wc_cart_pdf_destination', 'child_theme_wc_cart_pdf_destination' );\n<\/code><\/pre><\/dd>\n<dt id='how%20to%20require%20user%20to%20be%20logged%20in%20to%20download%20cart%20as%20pdf%3F'><h3>How to require user to be logged in to download cart as PDF?<\/h3><\/dt>\n<dd><p>Add the following code snippet to your themes functions.php:<\/p>\n\n<pre><code>\/**\n* Remove the default download cart button\n*\/\nremove_action( 'woocommerce_proceed_to_checkout', 'wc_cart_pdf_button', 21 );\n\n\n\/**\n* Replace the default download cart button with our own logic to display a login notice for guests\n*\/\nfunction child_theme_wc_cart_pdf_button() {\n    if( ! is_cart() || WC()-&gt;cart-&gt;is_empty() ) {\n        return;\n    }\n\n    if ( is_user_logged_in() ) :\n    ?&gt;\n\n    &lt;a href=\"&lt;?php echo esc_url( wp_nonce_url( add_query_arg( array( 'cart-pdf' =&gt; '1' ), wc_get_cart_url() ), 'cart-pdf' ) );?&gt;\" class=\"cart-pdf-button button\" target=\"_blank\"&gt;\n        &lt;?php esc_html_e( 'Download Cart as PDF', 'wc-cart-pdf' ); ?&gt;\n    &lt;\/a&gt;\n\n    &lt;?php else : ?&gt;\n\n    &lt;p&gt;&lt;a href=\"&lt;?php echo get_permalink( get_option( 'woocommerce_myaccount_page_id' ) ); ?&gt;\" class=\"cart-pdf-login\"&gt;&lt;?php esc_html_e( 'Please login to download your cart as a PDF', 'wc-cart-pdf' ); ?&gt;&lt;\/a&gt;&lt;\/p&gt;\n\n    &lt;?php \n    endif;\n}\nadd_action( 'woocommerce_proceed_to_checkout', 'child_theme_wc_cart_pdf_button', 21 );\n<\/code><\/pre><\/dd>\n<dt id='product%20images%20are%20not%20showing%20on%20pdf'><h3>Product images are not showing on PDF<\/h3><\/dt>\n<dd><p>Try adding the following to your <strong>wp-config.php<\/strong> file:<\/p>\n\n<pre><code>define( 'WC_CART_PDF_THUMBNAIL_COMPATIBILITY', true );\n<\/code><\/pre><\/dd>\n<dt id='how%20can%20i%20customize%20the%20pdf%20template%3F'><h3>How can I customize the PDF template?<\/h3><\/dt>\n<dd><p>Copy the PDF template from the plugin folder <strong>wc-cart-pdf\/templates\/cart-table.php<\/strong> into your child theme folder <strong>child-theme\/woocommerce\/wc-cart-pdf\/cart-table.php<\/strong>.<\/p>\n\n<p>From there you can modify the PDF template in your child theme.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>3.2.0\n* Rename plugin to Cart PDF for WooCommerce<\/p>\n\n<p>3.1.2\n* Fix product thumbnail width too large\n* Add filters <code>wc_cart_pdf_thumbnail_width<\/code> and <code>wc_cart_pdf_thumbnail_height<\/code><\/p>\n\n<p>3.1.1\n* Fix JS error <code>select.getCustomerData()<\/code> undefined under certain scenarios<\/p>\n\n<p>3.1\n* Compatibility with WP 6.7<\/p>\n\n<p>3.0.2\n* Fix PDF template not translating the date<\/p>\n\n<p>3.0.1\n* Fix PDF not generating when changing shipping method<\/p>\n\n<p>3.0.0\n* <strong>BREAKING CHANGE<\/strong>: Scoped dependencies to prevent collisions. References to namespace <code>\\Mpdf<\/code> is now <code>\\WCCartPDF\\Mpdf<\/code><\/p>\n\n<p>2.10.0\n* Set minimum compatibility to PHP 8+<\/p>\n\n<p>2.9.4\n* Fix fatal error due to missing second parameter on <code>woocommerce_email_styles<\/code> filter. (Filter removed)<\/p>\n\n<p>2.9.3\n* Fix <code>wc_cart_pdf_filename<\/code> filter not being applied to admin copy<\/p>\n\n<p>2.9.2\n* Update compatibility with WooCommerce cart and checkout blocks<\/p>\n\n<p>2.9.1\n* Fix Georgian language not displaying all characters<\/p>\n\n<p>2.9.0\n* Compatibility with All Products for Woo Subscriptions\n* Improve PDF product thumbnail compatibility<\/p>\n\n<p>2.8.0\n* Migrate settings to WooCommerce &gt; Settings &gt; Integration &gt; Cart PDF\n* Add ability to capture customer details via modal popup before downloading cart as PDF\n* Additional compatbility with WooCommerce blocks<\/p>\n\n<p>2.7.0\n* Add Cart PDF Button block<\/p>\n\n<p>2.6.0\n* HPOS (high performance order storage) compatibility<\/p>\n\n<p>2.5.0\n* TranslatePress compatibility<\/p>\n\n<p>2.4.0\n* Update broken image compatibility\n* Add debug capability using constant <code>define( 'WC_CART_PDF_DEBUG', true );<\/code> to <strong>wp-config.php<\/strong><\/p>\n\n<p>2.3.1\n* Update compatibility<\/p>\n\n<p>2.3.0\n* Improve multilingual capabilities\n* Add customizer control to open PDF in new tab<\/p>\n\n<p>2.2.3\n* Update compatibility<\/p>\n\n<p>2.2.2\n* Update compatibility<\/p>\n\n<p>2.2.1\n* Fix capture customer not working properly for logged in users<\/p>\n\n<p>2.2.0\n* Add customizer option to display unique generated PDF number on PDF<\/p>\n\n<p>2.1.7\n* Disable lazy loading product thumbnails by default\n* Add <code>define( 'WC_CART_PDF_THUMBNAIL_COMPATIBILITY', true );<\/code> to <strong>wp-config.php<\/strong> in an attempt to fix product thumbnails not loading<\/p>\n\n<p>2.1.6\n* Fix logo rendering on cart table PDF template<\/p>\n\n<p>2.1.5\n* Fix capture customer feature to only capture certain checkout fields<\/p>\n\n<p>2.1.4\n* Customizer option to show Download Cart as PDF button on checkout\n* Ability to capture customer and guest information from checkout and display on PDF<\/p>\n\n<p>2.1.3\n* Add language translation file\n* Stylesheet changes<\/p>\n\n<p>2.1.2\n* Add compatibility with Gravity PDF plugin<\/p>\n\n<p>2.1.1\n* Send admin email as HTML<\/p>\n\n<p>2.1.0\n* Ability to send an emailed copy of generated PDF to admin\n* Add date to PDF\n* Add customer details to PDF<\/p>\n\n<p>2.0.6\n* Update compatibility tag\n* Two new hooks to modify PDF output<\/p>\n\n<p>2.0.5\n* WordPress 5.4 compatibility\n* Add support for coupons displaying on PDF\n* Add minimum PHP requirements admin notice and prevent loading if not satisfied\n* Minor styling update to PDF<\/p>\n\n<p>2.0.4\n* Added compatibility with Visual Products Configurator\n* Perform WC cart calculate_totals() method prior to generating PDF\n* Added customizer setting to modify download cart as PDF button label<\/p>\n\n<p>2.0.3\n* Fix composer dependencies<\/p>\n\n<p>2.0.2\n* Update compatibility<\/p>\n\n<p>2.0.1\n* Fix product thumbnails too large<\/p>\n\n<p>2.0.0\n* Change PDF library from Dompdf to mPDF\n* Add support for RTL languages<\/p>\n\n<p>1.0.5\n* Fix CSS for language support\n* Default font to Noto Sans for language support\n* Update Dompdf<\/p>\n\n<p>1.0.4\n* Add PDF template actions hooks <code>wc_cart_pdf_before_template<\/code> and <code>wc_cart_pdf_after_template<\/code><\/p>\n\n<p>1.0.3\n* Add customizer option to change PDF header logo, width and alignment\n* Adjustments to default widths and styling of PDF cart table\n* Bug fix: Expand {site_title} variable placeholder in PDF footer text<\/p>\n\n<p>1.0.2\n* Tested up to WordPress 5.1\n* Add <code>wc_cart_pdf_stream_options<\/code> filter for stream options<\/p>\n\n<p>1.0.1\n* Add compatibility with TM Extra Product Options\n* Add ability to override PDF template and CSS through the theme folder woocommerce\/wc-cart-pdf\/\n* Add filter to change PDF filename\n* Add shipping and taxes to PDF\n* Add WooCommerce error notice if nonce is invalid\n* Add action hook before PDF is generated<\/p>\n\n<p>1.0.0\n* Initial plugin release<\/p>","raw_excerpt":"Adds ability for users and guests to download their WooCommerce cart as PDF","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/98318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=98318"}],"author":[{"embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cloudcatch"}],"wp:attachment":[{"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=98318"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=98318"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=98318"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=98318"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=98318"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/sq.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=98318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}