woocommerce/woocommerce
wp-content hardcoded instead of using WP_CONTENT_DIR
Closed
#30,898 opened on Oct 7, 2021
BugGood First IssueOrder ManagementRubikplugin: woocommerce
Repository metrics
- Stars
- (10,294 stars)
- PR merge metrics
- (Avg merge 9d 12h) (423 merged PRs in 30d)
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 ) ) {