Skip to content

Commit

Permalink
Fix: my account PDF link conflict with Jetpack analytics module (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf authored Sep 22, 2023
1 parent 8ba86c7 commit 7889eb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/class-wcpdf-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function instance() {
}

public function __construct() {
add_filter( 'woocommerce_my_account_my_orders_actions', array( $this, 'my_account_pdf_link' ), 10, 2 );
add_filter( 'woocommerce_my_account_my_orders_actions', array( $this, 'my_account_pdf_link' ), 999, 2 ); // needs to be triggered later because of Jetpack query string: https://github.com/Automattic/jetpack/blob/1a062c5388083c7f15b9a3e82e61fde838e83047/projects/plugins/jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-my-account.php#L235
add_filter( 'woocommerce_api_order_response', array( $this, 'woocommerce_api_invoice_number' ), 10, 2 );
add_action( 'wp_enqueue_scripts', array( $this, 'open_my_account_pdf_link_on_new_tab' ), 999 );
add_shortcode( 'wcpdf_download_invoice', array( $this, 'generate_document_shortcode' ) );
Expand Down

0 comments on commit 7889eb7

Please sign in to comment.