Api_Server::charge_credit()

charge_credit


Return Return

(mixed) false||array


Source Source

File: src/core/classes/class-api-server.php

	public static function charge_credit() {

		self::has_credits();

		$params = array(
			'endpoint' => 'v2/credits',
			'body'     => array(
				'action' => 'reduce_credits',
			),
		);

		$license = self::api_call( $params );

		set_transient( 'automator_api_license', $license['data'], HOUR_IN_SECONDS );

		return $license['data'];

	}