Support » Plugin: Phone Orders for WooCommerce » Good but…

  • Matt

    (@braquopronos)


    Good plugin but we should be able to find customer by “billing_phone”

    If you can add this feature it will be great 🙂

    • This topic was modified 1 year, 1 month ago by Matt. Reason: Fixed
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello
    There is option “Customer search by shipping/billing fields”
    in >Settings>Customers. It’s PRO feature, and we don’t plan to move this option to free version.

    But we use WooCommerce customer search, so it’s possible to modify search,
    using this hook (I put exact code to enable search by phone).

    thanks, Alex

    add_filter( "woocommerce_customer_search_customers", function ( $filter, $term, $limit, $type ) {
        if ( $type == 'meta_query' ) {
              $filter['meta_query'][] = array( 'key' => 'billing_phone', 'value' => $term, 'compare' => 'LIKE' );
        }
        return $filter;
    }, 10, 4 );
    • This reply was modified 1 year, 1 month ago by algol.plus.
    Thread Starter Matt

    (@braquopronos)

    Perfect, It Works, thanks !

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Good but…’ is closed to new replies.