<?php
/**
 * Minimal stand-in for the Freemius SDK, used until the Freemius product
 * ID and public key are configured. Every capability check reports the
 * free plan so the plugin behaves exactly like the free version.
 *
 * @package RedirectZen
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class RDZ_Freemius_Stub {

	public function can_use_premium_code() {
		return false;
	}

	public function is_premium() {
		return false;
	}

	public function is_paying() {
		return false;
	}

	public function is_plan( $plan, $exact = false ) {
		return false;
	}

	public function get_upgrade_url() {
		return admin_url( 'admin.php?page=redirectzen-upgrade' );
	}

	/**
	 * Swallows any Freemius API call the plugin might make (add_filter,
	 * add_action, etc.) so code written against the real SDK keeps working.
	 *
	 * @param string $name Method name.
	 * @param array  $args Arguments.
	 * @return null
	 */
	public function __call( $name, $args ) {
		return null;
	}
}
