{"id":5559919,"date":"2014-12-09T15:06:35","date_gmt":"2014-12-09T15:06:35","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/woocommerce-restrict-method-payment-to-roles\/"},"modified":"2016-08-22T13:21:15","modified_gmt":"2016-08-22T13:21:15","slug":"woocommerce-restrict-method-payment-to-roles","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/woocommerce-restrict-method-payment-to-roles\/","title":{"rendered":"Woocommerce Restrict Method Payment to Roles"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I&#8217;m looking for a snippet to restrict payment options to roles. I&#8217;m creating a wholesaler role and would like to restrict the COD, cheque etc payment methods to wholesalers only and restrict consumer payments to Paypal and SagePay only. I know there is an app for $49 (http:\/\/www.woothemes.com\/products\/role-based-payment-shipping-methods\/) which does this, but I&#8217;ve found snippets to restrict based on order total here https:\/\/wordpress.org\/support\/topic\/restrict-payment-options-based-on-product and thinking there must be a way to adapt this for roles rather than order totals&#8230; Can anyone please help? My coding knowledge is limited so I am stuck!<\/p>\n<p>Thanks in advance!<\/p>\n","protected":false},"template":"","class_list":["post-5559919","topic","type-topic","status-closed","hentry","topic-tag-restricted"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5559919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5559919\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5559919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}