Completed
Branch FET-9608-locate-template-actio... (245c03)
by
unknown
1054:20 queued 1036:22
created
shortcodes/espresso_txn_page/EES_Espresso_Txn_Page.shortcode.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 				$gateway = $payment_method->type_obj()->get_gateway();
97 97
 				if (
98 98
 					$gateway instanceof EE_Offsite_Gateway
99
-				    && $gateway->handle_IPN_in_this_request(
99
+					&& $gateway->handle_IPN_in_this_request(
100 100
 						\EE_Registry::instance()->REQ->params(),
101 101
 						true
102 102
 					)
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 *  @return 	void
43 43
 	 */
44 44
 	public static function set_hooks() {
45
-		add_action( 'wp_loaded', array( 'EES_Espresso_Txn_Page', 'set_definitions' ), 2 );
45
+		add_action('wp_loaded', array('EES_Espresso_Txn_Page', 'set_definitions'), 2);
46 46
 	}
47 47
 
48 48
 	/**
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 	 *  @return 	void
64 64
 	 */
65 65
 	public static function set_definitions() {
66
-		define( 'TXN_PAGE_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' . DS );
67
-		define( 'TXN_PAGE_TEMPLATES_PATH', str_replace( '\\', DS, plugin_dir_path( __FILE__ )) . 'templates' . DS );
66
+		define('TXN_PAGE_ASSETS_URL', plugin_dir_url(__FILE__).'assets'.DS);
67
+		define('TXN_PAGE_TEMPLATES_PATH', str_replace('\\', DS, plugin_dir_path(__FILE__)).'templates'.DS);
68 68
 	}
69 69
 
70 70
 
@@ -77,22 +77,22 @@  discard block
 block discarded – undo
77 77
 	 *  @param 	 WP $WP
78 78
 	 *  @return 	void
79 79
 	 */
80
-	public function run( WP $WP ) {
81
-		if ( EE_Registry::instance()->REQ->is_set('e_reg_url_link' )){
82
-			$this->_current_txn = EE_Registry::instance()->load_model( 'Transaction' )->get_transaction_from_reg_url_link();
80
+	public function run(WP $WP) {
81
+		if (EE_Registry::instance()->REQ->is_set('e_reg_url_link')) {
82
+			$this->_current_txn = EE_Registry::instance()->load_model('Transaction')->get_transaction_from_reg_url_link();
83 83
 		} else {
84 84
 			$this->_current_txn = null;
85 85
 		}
86
-		if ( $this->_current_txn instanceof EE_Transaction ) {
86
+		if ($this->_current_txn instanceof EE_Transaction) {
87 87
 			//EE_Registry::instance()->load_helper( 'Debug_Tools' );
88 88
 			//EEH_Debug_Tools::log( __CLASS__, __FUNCTION__, __LINE__, array( $this->_current_txn ), true, 	'EE_Transaction: ' . $this->_current_txn->ID() );
89 89
 			$payment_method = null;
90
-			$payment_method_slug = EE_Registry::instance()->REQ->get( 'ee_payment_method', null );
91
-			if( $payment_method_slug ) {
92
-				$payment_method = EEM_Payment_Method::instance()->get_one_by_slug( $payment_method_slug );
90
+			$payment_method_slug = EE_Registry::instance()->REQ->get('ee_payment_method', null);
91
+			if ($payment_method_slug) {
92
+				$payment_method = EEM_Payment_Method::instance()->get_one_by_slug($payment_method_slug);
93 93
 			}
94 94
 
95
-			if ( $payment_method instanceof EE_Payment_Method && $payment_method->is_off_site() ) {
95
+			if ($payment_method instanceof EE_Payment_Method && $payment_method->is_off_site()) {
96 96
 				$gateway = $payment_method->type_obj()->get_gateway();
97 97
 				if (
98 98
 					$gateway instanceof EE_Offsite_Gateway
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
 					)
103 103
 				) {
104 104
 					/** @type EE_Payment_Processor $payment_processor */
105
-					$payment_processor = EE_Registry::instance()->load_core( 'Payment_Processor' );
106
-					$payment_processor->process_ipn( $_REQUEST, $this->_current_txn, $payment_method );
105
+					$payment_processor = EE_Registry::instance()->load_core('Payment_Processor');
106
+					$payment_processor->process_ipn($_REQUEST, $this->_current_txn, $payment_method);
107 107
 				}
108 108
 			}
109 109
 			//allow gateways to add a filter to stop rendering the page
110
-			if( apply_filters( 'FHEE__EES_Espresso_Txn_Page__run__exit', FALSE ) ){
110
+			if (apply_filters('FHEE__EES_Espresso_Txn_Page__run__exit', FALSE)) {
111 111
 				exit;
112 112
 			}
113 113
 		}
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
 	 *  @param		array 	$attributes
125 125
 	 *  @return 	string
126 126
 	 */
127
-	public function process_shortcode( $attributes = array() ) {
128
-		return __( 'This is the Event Espresso Transactions page. This page receives instant payment notification (IPN) requests and should have a status of published, but should not be easily accessible by site visitors. Do not add it to your website\'s navigation menu or link to it from another page. Also, do not delete it or change its status to private.', 'event_espresso' );
127
+	public function process_shortcode($attributes = array()) {
128
+		return __('This is the Event Espresso Transactions page. This page receives instant payment notification (IPN) requests and should have a status of published, but should not be easily accessible by site visitors. Do not add it to your website\'s navigation menu or link to it from another page. Also, do not delete it or change its status to private.', 'event_espresso');
129 129
 	}
130 130
 
131 131
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.