Advertisement
MrJoshMiller

After paid in full, subscribe member

Nov 15th, 2013
761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.12 KB | None | 0 0
  1. { "rules_after_paid_in_full_subscribe_member" : {
  2.     "LABEL" : "After paid in full, subscribe member",
  3.     "PLUGIN" : "reaction rule",
  4.     "REQUIRES" : [ "rules", "commerce_payment" ],
  5.     "ON" : [ "commerce_payment_order_paid_in_full" ],
  6.     "DO" : [
  7.       { "LOOP" : {
  8.           "USING" : { "list" : [ "commerce-order:commerce-line-items" ] },
  9.           "ITEM" : { "list_item" : "Current list item" },
  10.           "DO" : [
  11.             { "component_rules_step_1_confirm_line_item_has_product_display" : {
  12.                 "USING" : {
  13.                   "line_item" : [ "list-item" ],
  14.                   "user_purchased" : [ "commerce-order:owner" ]
  15.                 },
  16.                 "PROVIDE" : { "product_display" : { "product_display" : "product_display" } }
  17.               }
  18.             },
  19.             { "component_rules_step_2_confirm_product_display_is_og_set_user_to_member" : {
  20.                 "line_item" : [ "list-item" ],
  21.                 "product_display" : [ "product_display" ],
  22.                 "user_purchased" : [ "commerce-order:owner" ]
  23.               }
  24.             }
  25.           ]
  26.         }
  27.       }
  28.     ]
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement