* Filter for line items in abstract-wc-order.php
When creating custom product class there are places where line items is only value that can be handled. This is one of that places causing subtotal values after checkout not to be calculated and displayed.
* Extension to woocommerce_order_get_items filter
This is extension to filter as get_items() is used for different classes and types. This way it would be possible to distinct which type is called for items.
* Removed filtering inside subtotal function
$types parameter is added as parameter for filter inside get_items() function so previous commit is reverted as there is no need for it.
* 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
* Fix - #17413
Update the `json_search_products` function to use the
`wc_products_array_filter_visible` filter rather then the
`wc_products_array_filter_editable` filter
Added an additional if condition to the `is_visible` function to check
if the product had a parent and it's post status
* remove additional comment from code to keep it clean
* Reverted filter
* Updated the is_visable to check parent product post status using WooCommerce class methods
* Updated the `if empty` check to make it is compatible with older versions of php
* Removed the empty check infavor of just testing on the returned value
Updated the way we are retrieving the partent product object
* Moved the `$parent_product` variable assigment out of the if statement.