array( "required" => true, "value" => phpversion("DOM"), "result" => class_exists("DOMDocument"), ), "MBString extension" => array( "required" => true, "value" => phpversion("mbstring"), "result" => function_exists("mb_send_mail"), "fallback" => "Recommended, will use fallback functions", ), "GD" => array( "required" => true, "value" => phpversion("gd"), "result" => function_exists("imagecreate"), "fallback" => "Required if you have images in your documents", ), // "PCRE" => array( // "required" => true, // "value" => phpversion("pcre"), // "result" => function_exists("preg_match") && @preg_match("/./u", "a"), // "failure" => "PCRE is required with Unicode support (the \"u\" modifier)", // ), "Zlib" => array( "required" => "To compress PDF documents", "value" => phpversion("zlib"), "result" => function_exists("gzcompress"), "fallback" => "Recommended to compress PDF documents", ), "opcache" => array( "required" => "For better performances", "value" => null, "result" => false, "fallback" => "Recommended for better performances", ), "GMagick or IMagick" => array( "required" => "Better with transparent PNG images", "value" => null, "result" => extension_loaded("gmagick") || extension_loaded("imagick"), "fallback" => "Recommended for better performances", ), "glob()" => array( "required" => "Required to detect custom templates and to clear the temp folder periodically", "value" => null, "result" => function_exists("glob"), "fallback" => "Check php disable_functions", ), "WP Memory Limit" => array( "required" => 'Recommended: 128MB (more for plugin-heavy setups)
See: Increasing the WordPress Memory Limit', "value" => sprintf("WordPress: %s, PHP: %s", WP_MEMORY_LIMIT, $php_mem_limit ), "result" => $memory_limit > 67108864, ), 'allow_url_fopen' => array ( 'required' => 'Allow remote stylesheets and images', 'value' => null, 'result' => ini_get("allow_url_fopen"), "fallback" => "allow_url_fopen disabled", ), ); if (($xc = extension_loaded("xcache")) || ($apc = extension_loaded("apc")) || ($zop = extension_loaded("Zend OPcache")) || ($op = extension_loaded("opcache"))) { $server_configs["opcache"]["result"] = true; $server_configs["opcache"]["value"] = ( $xc ? "XCache ".phpversion("xcache") : ( $apc ? "APC ".phpversion("apc") : ( $zop ? "Zend OPCache ".phpversion("Zend OPcache") : "PHP OPCache ".phpversion("opcache") ) ) ); } if (($gm = extension_loaded("gmagick")) || ($im = extension_loaded("imagick"))) { $server_configs["GMagick or IMagick"]["value"] = ($im ? "IMagick ".phpversion("imagick") : "GMagick ".phpversion("gmagick")); } ?>

System Configuration

$server_config) { if ($server_config["result"]) { $background = "#9e4"; $color = "black"; } elseif (isset($server_config["fallback"])) { $background = "#FCC612"; $color = "black"; } else { $background = "#f43"; $color = "white"; } ?>
  Required Present
No. ".$server_config["fallback"].""; } if (isset($server_config["failure"])) { echo "
".$server_config["failure"]."
"; } } ?>
array ( 'description' => 'Central temporary plugin folder', 'value' => WPO_WCPDF()->main->get_tmp_path(), 'status' => (is_writable( WPO_WCPDF()->main->get_tmp_path() ) ? "ok" : "failed"), 'status_message' => (is_writable( WPO_WCPDF()->main->get_tmp_path() ) ? "Writable" : "Not writable"), ), 'WCPDF_ATTACHMENT_DIR' => array ( 'description' => 'Temporary attachments folder', 'value' => trailingslashit( WPO_WCPDF()->main->get_tmp_path( 'attachments' ) ), 'status' => (is_writable( WPO_WCPDF()->main->get_tmp_path( 'attachments' ) ) ? "ok" : "failed"), 'status_message' => (is_writable( WPO_WCPDF()->main->get_tmp_path( 'attachments' ) ) ? "Writable" : "Not writable"), ), 'DOMPDF_TEMP_DIR' => array ( 'description' => 'Temporary DOMPDF folder', 'value' => trailingslashit(WPO_WCPDF()->main->get_tmp_path( 'dompdf' )), 'status' => (is_writable(WPO_WCPDF()->main->get_tmp_path( 'dompdf' )) ? "ok" : "failed"), 'status_message' => (is_writable(WPO_WCPDF()->main->get_tmp_path( 'dompdf' )) ? "Writable" : "Not writable"), ), 'DOMPDF_FONT_DIR' => array ( 'description' => 'DOMPDF fonts folder (needs to be writable for custom/remote fonts)', 'value' => trailingslashit(WPO_WCPDF()->main->get_tmp_path( 'fonts' )), 'status' => (is_writable(WPO_WCPDF()->main->get_tmp_path( 'fonts' )) ? "ok" : "failed"), 'status_message' => (is_writable(WPO_WCPDF()->main->get_tmp_path( 'fonts' )) ? "Writable" : "Not writable"), ), ); $upload_dir = wp_upload_dir(); $upload_base = trailingslashit( $upload_dir['basedir'] ); ?>

Write Permissions

Description Value Status
','\\' ), $permission['value'] ); ?>

The central temp folder is main->get_tmp_path(); ?>. By default, this folder is created in the WordPress uploads folder (), which can be defined by setting UPLOADS in wp-config.php. Alternatively, you can control the specific folder for PDF invoices by using the wpo_wcpdf_tmp_path filter. Make sure this folder is writable and that the subfolders attachments, dompdf and fonts are present (these will be created by the plugin if the central temp folder is writable).

If the temporary folders were not automatically created by the plugin, verify that all the font files (from plugin_path() . "/vendor/dompdf/dompdf/lib/fonts/"; ?>) are copied to the fonts folder. Normally, this is fully automated, but if your server has strict security settings, this automated copying may have been prohibited. In that case, you also need to make sure these folders get synchronized on plugin updates!