autoship_product_variations_discount_data()

(src/products.php) Takes a WC Variable Product or Variable Product ID and retrieves all the Autoship Discount and Options data for that product's variations.

Example:

// Print variation data to product page during development

function print_test(){
  print_r(autoship_product_variations_discount_data("9319"));
}
  add_action( 'woocommerce_before_single_product', 'print_test', 10 );

Still need help? Contact Us Contact Us