wc_autoship_product_autoship_options_variable_price (filter)

Override prices implemented by WC Autoship Product Page Options plugin for variable products

Example

<?php
/**
* @param float $autoship_price
* @param int $variation_id
* @param int $current_user_id
* @return float
*/
function wc_autoship_product_autoship_options_variable_price_example( $autoship_price, $variation_id, $current_user_id ) {
  // Institute a 30% discount
  $autoship_price *= 0.7;
  return $autoship_price;
}
add_filter( 'wc_autoship_product_autoship_options_variable_price', 'wc_autoship_product_autoship_options_variable_price_example', 10, 3 );

Still need help? Contact Us Contact Us