That is right, @devhelemaaldebom: The shape used to preview the color chosen by the customer is not an available character within Open Sans, the font family we used in the Simple template. Unfortunately, this font does not include a similar geometrical shape either, that we could use as replacement.
That said, you could replace that square with the “(Color preview)” text, in order to quickly see the color picked:
/**
* PDF Invoices & Packing Slips for WooCommerce:
* Replace color square with "(Color Preview)" on the PDF documents
*/
add_filter( 'wpo_wcpdf_get_html', function( $html, $document ) {
$html = str_replace( '■', '(Color Preview) ', $html );
$html = str_replace( '■', '(Color Preview) ', $html );
return $html;
}, 10, 2);
In the case that you prefer to remove the square altogether, use this code snippet instead
/**
* PDF Invoices & Packing Slips for WooCommerce:
* Remove color square from the PDF documents
*/
add_filter( 'wpo_wcpdf_get_html', function( $html, $document ) {
$html = str_replace( '■', '', $html );
$html = str_replace( '■', '', $html );
return $html;
}, 10, 2);
If you haven’t worked with code snippets (actions/filters) or functions.php
before, read this guide: How to use filters
Let me know if any of the code snippets worked! ??