Changeset 2002317
- Timestamp:
- 12/27/2018 01:52:08 PM (7 years ago)
- Location:
- woo-gateway-mc2p
- Files:
-
- 5 edited
- 16 copied
-
tags/1.2.0 (copied) (copied from woo-gateway-mc2p/trunk)
-
tags/1.2.0/README.md (copied) (copied from woo-gateway-mc2p/trunk/README.md)
-
tags/1.2.0/assets (copied) (copied from woo-gateway-mc2p/trunk/assets)
-
tags/1.2.0/languages (copied) (copied from woo-gateway-mc2p/trunk/languages)
-
tags/1.2.0/lib (copied) (copied from woo-gateway-mc2p/trunk/lib)
-
tags/1.2.0/license.txt (copied) (copied from woo-gateway-mc2p/trunk/license.txt)
-
tags/1.2.0/readme.txt (copied) (copied from woo-gateway-mc2p/trunk/readme.txt)
-
tags/1.2.0/wc_gateway_mc2p.php (copied) (copied from woo-gateway-mc2p/trunk/wc_gateway_mc2p.php)
-
tags/1.2.2 (copied) (copied from woo-gateway-mc2p/trunk)
-
tags/1.2.2/README.md (copied) (copied from woo-gateway-mc2p/trunk/README.md)
-
tags/1.2.2/assets (copied) (copied from woo-gateway-mc2p/trunk/assets)
-
tags/1.2.2/languages (copied) (copied from woo-gateway-mc2p/trunk/languages)
-
tags/1.2.2/languages/wc_gateway_mc2p-es_ES.mo (modified) (previous)
-
tags/1.2.2/languages/wc_gateway_mc2p-es_ES.po (modified) (1 diff)
-
tags/1.2.2/lib (copied) (copied from woo-gateway-mc2p/trunk/lib)
-
tags/1.2.2/license.txt (copied) (copied from woo-gateway-mc2p/trunk/license.txt)
-
tags/1.2.2/readme.txt (copied) (copied from woo-gateway-mc2p/trunk/readme.txt)
-
tags/1.2.2/wc_gateway_mc2p.php (copied) (copied from woo-gateway-mc2p/trunk/wc_gateway_mc2p.php) (7 diffs)
-
trunk/languages/wc_gateway_mc2p-es_ES.mo (modified) (previous)
-
trunk/languages/wc_gateway_mc2p-es_ES.po (modified) (1 diff)
-
trunk/wc_gateway_mc2p.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woo-gateway-mc2p/tags/1.2.2/languages/wc_gateway_mc2p-es_ES.po
r1731546 r2002317 59 59 msgstr "Este texto será añadido en la página de gracias" 60 60 61 msgid "Set order as completed after payment?" 62 msgstr "¿Marcar el pedido como completado tras el pago?" 63 64 msgid "" 65 "After payment, should the order be set as completed? Default is \"processing" 66 "\"." 67 msgstr "" 68 "Tras el pago, ¿deseas marcar el pedido como completado? El valor por defecto " 69 "es \"procesando\"." 70 71 msgid "No" 72 msgstr "No" 73 74 msgid "Yes" 75 msgstr "Sí" 76 61 77 msgid "Payment of order " 62 78 msgstr "Pago del pedido " -
woo-gateway-mc2p/tags/1.2.2/wc_gateway_mc2p.php
r1983253 r2002317 6 6 * Author: MyChoice2Pay 7 7 * Author URI: https://www.mychoice2pay.com/ 8 * Version: 1.2. 08 * Version: 1.2.2 9 9 * Text Domain: wc_mc2p_payment_gateway 10 10 * Domain Path: /i18n/languages/ … … 62 62 * @class WC_Gateway_MC2P 63 63 * @extends WC_Payment_Gateway 64 * @version 1.2. 064 * @version 1.2.2 65 65 * @package WooCommerce/Classes/Payment 66 66 * @author MyChoice2Pay … … 104 104 $this->description = $this->get_option( 'description' ); 105 105 $this->thank_you_text = $this->get_option( 'thank_you_text', $this->description ); 106 $this->set_completed = $this->get_option( 'set_completed', 'N' ); 106 107 107 108 // Actions … … 189 190 'default' => '', 190 191 'desc_tip' => true, 192 ), 193 'set_completed' => array( 194 'title' => __( 'Set order as completed after payment?', 'wc-gateway-mc2p' ), 195 'type' => 'select', 196 'description' => __( 'After payment, should the order be set as completed? Default is "processing".', 'wc-gateway-mc2p' ), 197 'desc_tip' => false, 198 'options' => array( 199 'N' => __( 'No', 'wc-gateway-mc2p' ), 200 'Y' => __( 'Yes', 'wc-gateway-mc2p' ), 201 ), 202 'default' => 'N' 191 203 ), 192 204 ) ); … … 232 244 233 245 if( class_exists( 'WC_Subscriptions_Order' ) && WC_Subscriptions_Order::order_contains_subscription( $order_id ) ) { 234 $result = $this->process_subscription_payment( $mc2p, $order, $language );246 $result = $this->process_subscription_payment( $mc2p, $order, $language, $order_id ); 235 247 } else { 236 $result = $this->process_regular_payment( $mc2p, $order, $language );248 $result = $this->process_regular_payment( $mc2p, $order, $language, $order_id ); 237 249 } 238 250 239 251 // Mark as on-hold (we're awaiting the payment) 240 252 $order->update_status( 'on-hold', __( 'Awaiting MC2P payment', 'wc-gateway-mc2p' ) ); 241 242 // Reduce stock levels243 $order->reduce_order_stock();244 253 245 254 if ( version_compare( WOOCOMMERCE_VERSION, '2.0', '<' ) ) { … … 261 270 * @return array 262 271 */ 263 public function process_regular_payment( $mc2p, $order, $language ) {272 public function process_regular_payment( $mc2p, $order, $language, $order_id ) { 264 273 265 274 // Create transaction … … 300 309 * @return array 301 310 */ 302 public function process_subscription_payment( $mc2p, $order, $language ) {311 public function process_subscription_payment( $mc2p, $order, $language, $order_id ) { 303 312 304 313 $unconverted_periods = array( -
woo-gateway-mc2p/trunk/languages/wc_gateway_mc2p-es_ES.po
r1731546 r2002317 59 59 msgstr "Este texto será añadido en la página de gracias" 60 60 61 msgid "Set order as completed after payment?" 62 msgstr "¿Marcar el pedido como completado tras el pago?" 63 64 msgid "" 65 "After payment, should the order be set as completed? Default is \"processing" 66 "\"." 67 msgstr "" 68 "Tras el pago, ¿deseas marcar el pedido como completado? El valor por defecto " 69 "es \"procesando\"." 70 71 msgid "No" 72 msgstr "No" 73 74 msgid "Yes" 75 msgstr "Sí" 76 61 77 msgid "Payment of order " 62 78 msgstr "Pago del pedido " -
woo-gateway-mc2p/trunk/wc_gateway_mc2p.php
r1983253 r2002317 6 6 * Author: MyChoice2Pay 7 7 * Author URI: https://www.mychoice2pay.com/ 8 * Version: 1.2. 08 * Version: 1.2.2 9 9 * Text Domain: wc_mc2p_payment_gateway 10 10 * Domain Path: /i18n/languages/ … … 62 62 * @class WC_Gateway_MC2P 63 63 * @extends WC_Payment_Gateway 64 * @version 1.2. 064 * @version 1.2.2 65 65 * @package WooCommerce/Classes/Payment 66 66 * @author MyChoice2Pay … … 104 104 $this->description = $this->get_option( 'description' ); 105 105 $this->thank_you_text = $this->get_option( 'thank_you_text', $this->description ); 106 $this->set_completed = $this->get_option( 'set_completed', 'N' ); 106 107 107 108 // Actions … … 189 190 'default' => '', 190 191 'desc_tip' => true, 192 ), 193 'set_completed' => array( 194 'title' => __( 'Set order as completed after payment?', 'wc-gateway-mc2p' ), 195 'type' => 'select', 196 'description' => __( 'After payment, should the order be set as completed? Default is "processing".', 'wc-gateway-mc2p' ), 197 'desc_tip' => false, 198 'options' => array( 199 'N' => __( 'No', 'wc-gateway-mc2p' ), 200 'Y' => __( 'Yes', 'wc-gateway-mc2p' ), 201 ), 202 'default' => 'N' 191 203 ), 192 204 ) ); … … 232 244 233 245 if( class_exists( 'WC_Subscriptions_Order' ) && WC_Subscriptions_Order::order_contains_subscription( $order_id ) ) { 234 $result = $this->process_subscription_payment( $mc2p, $order, $language );246 $result = $this->process_subscription_payment( $mc2p, $order, $language, $order_id ); 235 247 } else { 236 $result = $this->process_regular_payment( $mc2p, $order, $language );248 $result = $this->process_regular_payment( $mc2p, $order, $language, $order_id ); 237 249 } 238 250 239 251 // Mark as on-hold (we're awaiting the payment) 240 252 $order->update_status( 'on-hold', __( 'Awaiting MC2P payment', 'wc-gateway-mc2p' ) ); 241 242 // Reduce stock levels243 $order->reduce_order_stock();244 253 245 254 if ( version_compare( WOOCOMMERCE_VERSION, '2.0', '<' ) ) { … … 261 270 * @return array 262 271 */ 263 public function process_regular_payment( $mc2p, $order, $language ) {272 public function process_regular_payment( $mc2p, $order, $language, $order_id ) { 264 273 265 274 // Create transaction … … 300 309 * @return array 301 310 */ 302 public function process_subscription_payment( $mc2p, $order, $language ) {311 public function process_subscription_payment( $mc2p, $order, $language, $order_id ) { 303 312 304 313 $unconverted_periods = array(
Note: See TracChangeset
for help on using the changeset viewer.