Tribe__Events__Community__Tickets__Gateway__PayPal::__construct()


Source

File: src/Tribe/Gateway/PayPal.php

	public function __construct() {
		parent::__construct();

		$community_tickets = tribe( 'community-tickets.main' );
		$settings = get_option( Tribe__Events__Community__Tickets__Main::OPTIONNAME, $community_tickets->option_defaults );

		foreach ( $settings as $key => $value ) {
			if ( false === strpos( $key, 'paypal' ) ) {
				continue;
			}

			$key = str_replace( 'paypal_', '', $key );

			$this->$key = $value;
		}//end foreach

		// if sandbox is enabled, use the static sandbox application id
		if ( $this->sandbox ) {
			$this->application_id = 'APP-80W284485P519543T';
		}
	}//end __construct