Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ardziej

    (@ardziej)

    Hi, i know how add filter.

    $available_variations[] = apply_filters( 'woocommerce_available_variation', array(
    					'variation_id' 			=> $child_id,
    					'attributes' 			=> $variation_attributes,
    					'image_src' 			=> $image,
    					'image_link' 			=> $image_link,
    					'image_title'			=> $image_title,
    					'price_html' 			=> $this->min_variation_price != $this->max_variation_price ? '<span class="price">' . $variation->get_price_html() . '</span>' : '',
    					'availability_html' 	=> $availability_html,
    					'sku' 					=> $variation->get_sku(),
    					'weight'				=> $variation->get_weight() . ' ' . esc_attr( get_option('woocommerce_weight_unit' ) ),
    					'dimensions'			=> $variation->get_dimensions(),
    					'min_qty' 				=> 1,
    					'max_qty' 				=> $this->backorders_allowed() ? '' : $variation->stock,
    					'backorders_allowed' 	=> $this->backorders_allowed(),
    					'is_in_stock'			=> $variation->is_in_stock(),
    					'is_downloadable' 		=> $variation->is_downloadable() ,
    					'is_virtual' 			=> $variation->is_virtual(),
    					'is_sold_individually' 	=> $variation->is_sold_individually() ? 'yes' : 'no',
    				), $this, $variation );

    But I don’t know how I can return array in my function with these vars.

    Thread Starter ardziej

    (@ardziej)

    Yeah, for me the better will be using hooks/filters.
    i try to do this your way.
    Thanks

    Hi, for me this does not show form…
    Second problem is when I enable WooCommerce Pay to Upload for product, variants are reset, and I’ve to set this again…
    Any ideas ?
    BTW. How this works ? How can I add manually code for form ?

Viewing 3 replies - 1 through 3 (of 3 total)