Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.3
Component:
Developer experience
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 May 2012 at 23:36 UTC
Updated:
8 Jun 2012 at 21:31 UTC
I have created a custom payment method, however, I want to add a custom rule condition with the payment method rule and export it into code. I know I can add the rule condition via the UI, but I want to have the condition saved in code.
Is there a way of adding a rule condition to the payment method rule via code?
Thanks
Comments
Comment #1
rszrama commentedPayment methods automatically have default rules created for them, so you need to determine if the default rule in your code can override that or not. If it can, then simply implement hook_default_rules_configuration() and define your rule; if not, then perhaps you can alter the default rule coming from the payment module. Look in commerce_payment.rules_defaults.inc for an example.
Comment #2
ivan zugec commentedThanks for your help.
Comment #3.0
(not verified) commentedUpdated issue.