Skip to content

Commit

Permalink
fix: update compatibility with woocommerce cart and checkout blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
dkjensen committed Jun 26, 2024
1 parent f402c30 commit c3f1607
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
=== WooCommerce Cart PDF ===
Contributors: cloudcatch, dkjensen, seattlewebco, davidperez, exstheme
Tested up to: 6.5
Tested up to: 6.5.5
Requires PHP: 5.6.0
Stable tag: 0.0.0-development
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Adds ability for users and guests to download their WooCommerce cart as PDF

Expand All @@ -27,6 +29,9 @@ Adds ability for users and guests to download their WooCommerce cart as PDF. Use

== Changelog ==

2.9.2
* Update compatibility with WooCommerce cart and checkout blocks

2.9.1
* Fix Georgian language not displaying all characters

Expand Down
5 changes: 3 additions & 2 deletions wc-cart-pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Contributors: cloudcatch, dkjensen, seattlewebco, davidperez, exstheme
* Requires at least: 6.2
* Requires PHP: 5.6.0
* WC tested up to: 8.7.0
* WC tested up to: 9.0.2
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -234,13 +234,14 @@ function wc_cart_pdf_process_download() {
add_action( 'template_redirect', 'wc_cart_pdf_process_download' );

/**
* Declare compatibility with HPOS.
* Declare compatibility with HPOS and Cart / Checkout blocks.
*/
add_action(
'before_woocommerce_init',
function () {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true );
}
}
);

0 comments on commit c3f1607

Please sign in to comment.