{"id":3980,"date":"2016-03-25T17:50:53","date_gmt":"2016-03-25T06:50:53","guid":{"rendered":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/?p=3980"},"modified":"2016-03-25T17:52:30","modified_gmt":"2016-03-25T06:52:30","slug":"simple-shopping-cart-adding-extra-paypal-input-fields","status":"publish","type":"post","link":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/simple-shopping-cart-adding-extra-paypal-input-fields-3980","title":{"rendered":"Simple Shopping Cart \u00e2\u20ac\u201c Adding Extra PayPal Input Fields"},"content":{"rendered":"<p>The <a href=\"https:\/\/www.tipsandtricks-hq.com\/wordpress-simple-paypal-shopping-cart-plugin-768\">simple shopping cart plugin<\/a> has a filter that you can use to add extra\u00c2\u00a0input fields that will get sent to\u00c2\u00a0PayPal as part of the checkout.<\/p>\n<h2>Code Example<\/h2>\n<p>The following code example shows how you can append extra fields to the checkout form\u00c2\u00a0(add this code to your theme&#8217;s functions.php file or a custom plugin).<\/p>\n<p>It will add the language code field to force a specific language on the PayPal checkout page.<\/p>\n<pre>add_filter('wspsc_cart_extra_paypal_fields', 'append_extra_fields');\r\nfunction append_extra_fields($output)\r\n{\r\n    \/\/Add the PayPal language code field\r\n    $output = '&lt;input name=\"lc\" type=\"hidden\" value=\"US\" \/&gt;';\r\n    return $output;\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The simple shopping cart plugin has a filter that you can use to add extra\u00c2\u00a0input fields that will get sent to\u00c2\u00a0PayPal as part of the checkout. Code Example The following code example shows how you can append extra fields to the checkout form\u00c2\u00a0(add this code to your theme&#8217;s functions.php file or a custom plugin). It [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[30],"tags":[40,182,169,24,32],"class_list":{"0":"post-3980","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-wordpress-shopping-cart","7":"tag-integration","8":"tag-paypal","9":"tag-paypal-api","10":"tag-tweaks","11":"tag-wp-shopping-cart","12":"entry"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/3980"}],"collection":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/comments?post=3980"}],"version-history":[{"count":0,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/posts\/3980\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/media?parent=3980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/categories?post=3980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tipsandtricks-hq.com\/ecommerce\/wp-json\/wp\/v2\/tags?post=3980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}