Developer zone

  1. Hook for before_calculate_totals function:

  • yaye_cart_line_total

  • yaye_cart_line_regular_total

$cost_total         = apply_filters('yaye_cart_line_total', Utils::get_price_from_yaycurrency( $cost_total ), $cart_value);
				$cost_regular_total = apply_filters('yaye_cart_line_regular_total', Utils::get_price_from_yaycurrency( $cost_regular_total ), $cart_value);

				$cart_value['data']->set_price( $cost_total );
				$cart_value['data']->set_regular_price( $cost_regular_total );
  1. Hook for total_price_text and subtotal_text:

add_filter( 'yaye_total_price_text', function( $text ) {
	return esc_html__( 'Custom Total Price text......', 'yayextra' );
});
add_filter( 'yaye_subtotal_text', function( $text ) {
	return esc_html__( 'Custom Subtotal text......', 'yayextra' );
});

Last updated

Was this helpful?