• Hi there, thanks for building this Plugin and maintaining it. Please note that direct database access is not recommended and WC functions are available to mitigate this.

    File: woocommerce-filter-orders-by-product/inc/filter-by-product.php

    Here’s also a way to allow the Plugin user to format the Product option label, i.e. appending the SKU


    $args = array(
    ‘status’ => apply_filters( ‘wfobp_product_status’, ‘publish )
    );
    $products = wc_get_products( $args );
    foreach( $products as $product ) {
    $fields[$product->get_id()] = apply_filters( ‘wfobp_product_option_label’, $product->get_title, $product );
    }

    • This topic was modified 3 years, 10 months ago by Michael Visser.
    • This topic was modified 3 years, 10 months ago by Yui.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Please use wc_get_products in dropdown_fields()’ is closed to new replies.