PDF Catalog Data & HTML Filters for custom post data

Additional filters have been introduced with version 1.7.1. and up. These can be used to add addtional HTML into the data. You need to return a HTML inside your add_filters option:

// Category HTML
apply_filters( 'woocommerce_pdf_catalog_category_html', $categoryTemplate->get_template($categoryLayout), $category_id);

// Product HTML
apply_filters('woocommerce_pdf_catalog_single_product_html', $html, $this->data->ID)

// All Product Data
apply_filters('woocommerce_pdf_catalog_product_data', $this->data);

// Product Information Filters - return $HTML
apply_filters('woocommerce_pdf_catalog_before_product_information', '', $this->data->ID);
apply_filters('woocommerce_pdf_catalog_before_product_information_start', '', $this->data->ID);
apply_filters('woocommerce_pdf_catalog_before_product_information_read_more', '', $this->data->ID);
apply_filters('woocommerce_pdf_catalog_before_product_information_categories', '', $this->data->ID);
apply_filters('woocommerce_pdf_catalog_before_product_information_end', '', $this->data->ID);
apply_filters('woocommerce_pdf_catalog_after_product_information', '', $this->data->ID);

4 thoughts on “PDF Catalog Data & HTML Filters for custom post data

  1. Santiago says:

    Hi guys, I need to modify the template or create a new one, I used the custom css option that enabled debug mode, but when I disable it again, the style code doesn’t work.

  2. Tahir says:

    Hi,
    I have the problem that Santiago is experiencing.
    I added the code “Custom CSS> .product-sku b {display: none;}”.
    But it didn’t work in PDF.
    What should I do?

    best regards,
    Tahir

    • Daniel Barenkamp says:

      Not all custom CSS is supported by the PDF rendering engine. You can use Loco translate plugin to remove certain sentences.

Leave a Reply

Your email address will not be published. Required fields are marked *