Bug with paths when using WP under Git
-
Hi
I’m using WordPress and WooCommerce with Git. WordPress is configured as a submodule and I have slightly different directories for wp-content.
Since this migration, I’m unable to view a PDF invoice from the Order page. When I click the link, I receive the following error:
Template not found! Check if the following file exists: wp-content/plugins/woocommerce-pdf-invoices-packing-slips/templates/pdf/Simple/invoice.phpThe file does exist, but it exists under a different path:
./website2017/content/plugins/woocommerce-pdf-invoices-packing-slips/templates/pdf/Simple/invoice.phpIt seems that it doesn’t work as expected when using a custom WP_CONTENT_DIR in wp-config.php. Here’s my wp-config.php:
define('WP_SITEURL', 'https://' . $_SERVER['SERVER_NAME'] . '/cms'); define('WP_HOME', 'https://' . $_SERVER['SERVER_NAME'] . ''); define('WP_CONTENT_DIR', dirname(__FILE__) . '/content'); define('WP_CONTENT_URL', 'https://' . $_SERVER['SERVER_NAME'] . '/content'); define('UPLOADS', '../uploads');Thanks in advance
Sam
The topic ‘Bug with paths when using WP under Git’ is closed to new replies.