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 changes the condition in the if the statement that decides
whether or not to display the "Paid by customer" section in the order admin
page. Before it, this section was displayed for all orders that
contained one of the following statuses: 'processing', 'completed' or 'refunded'.
The problem with this approach is that offline payment gateways, like
'Cash on Delivery', set the order status to processing when the order is
placed but before the customer pays for it. So the "Paid by customer"
section was being displayed in some cases where the order was not
actually paid yet creating a confusing experience to store managers.
To fix this, this commit also checks for the presence of the
`_date_paid` order meta. If this order meta is present and the order
status corresponds to one of the three statuses listed above, it means that
the order has been paid and we can display the "Paid by customer"
section. If this order meta is not present, we don't display the "Paid
by customer" section.
* Data escaped and validated. Plus translator comment documentation added.
* If it should be int then we should change the empty string default parameter to 0 as in 'if' condition checking 0 and empty string are same.
* Extra bracket removed.
* Indentation is fixed now.
* The taxonomy object should not be assigned to a variable before checking if this is a taxonomy or not.
* echo esc_attr__ replaced by esc_attr_e and visually tested.
* As I use WordPress VIP Coding Standard, they were marking them as warnings. But now it's fixed again.
* Escaping fix
* Extra Bracket Fix Again