diff --git a/classes/gateways/class-wc-paypal.php b/classes/gateways/class-wc-paypal.php index f847ea1e224..266a8bbdd79 100644 --- a/classes/gateways/class-wc-paypal.php +++ b/classes/gateways/class-wc-paypal.php @@ -37,6 +37,7 @@ class WC_Paypal extends WC_Payment_Gateway { $this->address_override = isset( $this->settings['address_override'] ) ? $this->settings['address_override'] : 'no'; $this->debug = $this->settings['debug']; $this->form_submission_method = ( isset( $this->settings['form_submission_method'] ) && $this->settings['form_submission_method'] == 'yes' ) ? true : false; + $this->page_style = ( isset( $this->settings['page_style'] ) ) ? $this->settings['page_style'] : ''; // Logs if ($this->debug=='yes') $this->log = $woocommerce->logger(); @@ -141,6 +142,12 @@ class WC_Paypal extends WC_Payment_Gateway { 'description' => __( 'Enable this to post order data to PayPal via a form instead of using a redirect/querystring.', 'woocommerce' ), 'default' => 'no' ), + 'page_style' => array( + 'title' => __( 'Page Style', 'woocommerce' ), + 'type' => 'text', + 'description' => __( 'Optionally enter the name of the page style you wish to use. These are defined within your PayPal account.', 'woocommerce' ), + 'default' => '' + ), 'testmode' => array( 'title' => __( 'PayPal sandbox', 'woocommerce' ), 'type' => 'checkbox', @@ -205,6 +212,7 @@ class WC_Paypal extends WC_Payment_Gateway { 'upload' => 1, 'return' => $this->get_return_url( $order ), 'cancel_return' => $order->get_cancel_order_url(), + 'page_style' => $this->page_style, // Order key 'custom' => $order_id, diff --git a/readme.txt b/readme.txt index a6176913e7a..799ae6a91f3 100644 --- a/readme.txt +++ b/readme.txt @@ -147,6 +147,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc * Feature - Allow attributes to be added from the edit product page * Feature - Allow external products to be a part of a grouped product. Button titles will be respected when displayed. * Feature - Added woocommerce_get_dimension/woocommerce_get_weight helpers for normalisation. Thanks Andy Zhang +* Feature - Pass page_style to paypal standard if defined * Tweak - Show multiple success messages/error messages if added, rather than one or the other * Tweak - Adding an item to an order now uses the ajax style product finder * Tweak - Updated chosen to latest release