Closed alexmigf closed 1 month ago
May I ask why you removed these codes:
// temporarily apply filters that need to be removed again after the html is generated
$html_filters = apply_filters( 'wpo_wcpdf_html_filters', array(), $document );
$this->add_filters( $html_filters );
do_action( 'wpo_wcpdf_before_html', $document->get_type(), $document );
@MohamadNateqi because $document->get_html()
already call them.
This PR aims to improve the Bulk document
get_html
method by placing the required hooks inside the orders loop. This is important because we detect and reset languages, in multilingual setups, using this hooks in each document here: https://github.com/wpovernight/woocommerce-pdf-ips-pro/pull/397/files#diff-f5fe2ecddcf1afabc5e611c28a555e0d99f5f1745d4f2dac8af70dda17dadf86R27-R29