autoship_total_variation_product_summary_data

(src/products.php) Part of the autoship_get_product_sync_summary() function to include a new summaries parameter that allows developers to use the QPilot API response in functions filtering the summary data. Takes the totals array, product array and ids as parameters.

    $totals['StockLevel']                    = $totals['TotalInStock'] ? 'InStock' : 'OutOfStock';
    $totals['Variations']                    = $variations;
    $totals['AutoshipVariations']            = $autoship_variations;
    $totals['SyncError']                     = reset( $errors );
    $totals['AllSyncError']                  = $errors;
    $totals['TotalErrors']                   = count( $errors );

    return apply_filters( 'autoship_total_variation_product_summary_data', $totals, $product, $ids, $summaries );

Still need help? Contact Us Contact Us