Tribe__Events__Community__Tickets__Adapter__WooCommerce_PayPal::__construct()
constructor!
Source
File: src/Tribe/Adapter/WooCommerce_PayPal.php
public function __construct() { global $woocommerce; $community_tickets = Tribe__Events__Community__Tickets__Main::instance(); $this->icon = apply_filters( 'tribe_community_tickets_paypal_icon', $community_tickets->plugin_url . 'src/resources/images/paypal.png' ); $this->notify_url = WC()->api_request_url( 'Tribe__Events__Community__Tickets__Adapter__WooCommerce_PayPal' ); $this->method_title = __( 'PayPal Split Payments', 'tribe-events-community-tickets' ); $settings_url = admin_url( 'edit.php?page=tribe-common&tab=community&post_type=tribe_events#tribe-field-enable_split_payments' ); $this->method_description = sprintf( __( 'Split the distribution of money between the site owner and event organizer at the time of ticket purchase with Community Tickets. Settings are available in %1$sEvents > Settings > Community%2$s', 'tribe-events-community-tickets' ), '<a href="' . esc_url( $settings_url ) . '">', '</a>' ); $this->order_button_text = __( 'Proceed to PayPal', 'tribe-events-community-tickets' ); add_action( 'woocommere_paypal_adaptive_payments_ipn', array( $this, 'process_ipn' ) ); add_action( 'woocommerce_api_tribe__events__community__tickets__adapter__woocommerce_paypal', array( $this, 'check_ipn_response' ) ); /** * Filters the current debug setting for WooCommerce. Defaults debugging to false. * * @param boolean $debug Current debug state for the WooCommerce_PayPal adapter * @return boolean */ $this->debug = apply_filters( 'tribe_community_tickets_woocommerce_paypal_debug', $this->debug ); // Active logs. if ( $this->debug ) { if ( class_exists( 'WC_Logger' ) ) { $this->log = new WC_Logger(); } else { $this->log = $woocommerce->logger(); } } }//end __construct