woocommerce_customer_get_total_spent_query

woocommerce_customer_get_total_spent_query

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_customer_get_total_spent_query') is found 1 times:

  • /includes/data-stores/class-wc-customer-data-store.php line 513
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    * @param string The SQL query to use.
     * @param WC_Customer The customer to get the total spent for.
     * @return string The actual SQL query to use.
     */
    $sql = apply_filters( 'woocommerce_customer_get_total_spent_query', $sql, $customer );
    //phpcs:enable WooCommerce.Commenting.CommentHooks.MissingSinceComment
     
    $spent = $wpdb->get_var( $sql );
    //phpcs:enable WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     
    if ( ! $spent ) {