wcpgsk_available_variation

The Woocommerce Poor Guys Swiss Knife wcpgsk available variation function.

Description

wcpgsk_available_variation( $variation_data, $product, $variation ); 

Parameters (3)

0. $variation_data
The variation data.
1. $product
The product.
2. $variation
The variation.

Usage

  1. if ( !function_exists( 'wcpgsk_available_variation' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-poor-guys-swiss-knife/wcpgsk-af.php'; 
  3.  
  4. // The variation data. 
  5. $variation_data = null; 
  6.  
  7. // The product. 
  8. $product = null; 
  9.  
  10. // The variation. 
  11. $variation = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wcpgsk_available_variation($variation_data, $product, $variation); 
  15.  

Defined (1)

The function is defined in the following location(s).

/wcpgsk-af.php  
  1. function wcpgsk_available_variation($variation_data, $product, $variation) { 
  2. $options = get_option( 'wcpgsk_settings' ); 
  3. $ival = apply_filters( 'woocommerce_quantity_input_min', '', $product ); 
  4. if ( !$ival ) : 
  5. $ival = apply_filters( 'woocommerce_quantity_input_step', '1', $product ); 
  6. endif; 
  7. $variation_data['min_qty'] = $ival; 
  8. return $variation_data;