Previously 'dirname( __FILE__ )' was used to import files, however, the directory separator was missing.
This commit replaces 'dirname( __FILE__ )' that was introduced in 5370d02484 with __DIR__ and added DIRECTORY_SEPARATOR
Relative include paths in PHP can break whenever the server is running opcache. As such, WordPress.com deploy system refuses to include WooCommerce because of that issue.
This commit changes the relative include paths to absolute include paths.
Relates to #27269
This commit replaces all the instances where the WPCS rule `WordPress.VIP.SlowDBQuery` was used with `WordPress.DB.SlowDBQuery`. `WordPress.VIP.SlowDBQuery` was deprecated in WPCS 2.0 and `WordPress.DB.SlowDBQuery` was added as a replacement (see 5f27d8e3a4/CHANGELOG.md (L130)).
Makes it more user-friendly for someone unfamiliar with WordPress/WooCommerce, and even for those who are familiar and don’t immediately see the typical “Add Coupon” button in the top left corner by the header.