woocommerce/woocommerce
View on GitHubwp-content hardcoded instead of using WP_CONTENT_DIR
Closed
#30898 opened on Oct 7, 2021
BugGood First IssueOrder ManagementRubikplugin: woocommerce
Description
/includes/class-wc-download-handler.php
is using hardcoded wp-content, which is wrong (and gives incorrect results when WP_CONTENT_DIR is not wp-content)
} elseif ( '/wp-content' === substr( $file_path, 0, 11 ) ) {
should be:
} elseif ( '/' . str_replace( ABSPATH, '', WP_CONTENT_DIR ) === substr( $file_path, 0, strlen( str_replace( ABSPATH, '', WP_CONTENT_DIR ) ) + 1 ) ) {