Module: Spree::Order::LoyaltyPoints::ClassMethods

Defined in:
app/models/concerns/spree/order/loyalty_points.rb

Instance Method Summary collapse

Instance Method Details

#credit_loyalty_points_to_userObject



29
30
31
32
33
34
35
# File 'app/models/concerns/spree/order/loyalty_points.rb', line 29

def credit_loyalty_points_to_user
  points_award_period = Spree::Config.loyalty_points_award_period
  uncredited_orders = Spree::Order.with_uncredited_loyalty_points(points_award_period)
  uncredited_orders.each do |order|
    order.award_loyalty_points
  end
end