wc_autoship_product_autoship_options_price (filter)

Override prices implemented by WC Autoship Product Page Options plugin

Example

<?php
/**
* @param float $autoship_price
* @param int $product_id
* @param int $current_user_id
* @return float
*/
function wc_autoship_product_autoship_options_price_example( $autoship_price, $product_id, $current_user_id ) {
  // Display a 30% discount
  $autoship_price *= 0.7;
  return $autoship_price;
}
add_filter( 'wc_autoship_product_autoship_options_price', 'wc_autoship_product_autoship_options_price_example', 10, 3 );

Still need help? Contact Us Contact Us