src/Modules/Licenser.php
function disable_wporg_update( $r, $url ) {

		if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/' ) ) {
			return $r;
		}

		// Decode the JSON response.
		$themes = json_decode( $r['body']['themes'] );

		unset( $themes->themes->{$this->product->get_slug()} );

		// Encode the updated JSON response.
		$r['body']['themes'] = json_encode( $themes );

		return $r;
	}
function disable_wporg_update( $r, $url ) {

		if ( 0 !== strpos( $url, 'https://api.wordpress.org/themes/update-check/' ) ) {
			return $r;
		}

		// Decode the JSON response.
		$themes = json_decode( $r['body']['themes'] );

		unset( $themes->themes->{$this->product->get_slug()} );

		// Encode the updated JSON response.
		$r['body']['themes'] = json_encode( $themes );

		return $r;
	}
function disable_wporg_update ( $ r , $ url ) { if ( 0 !== strpos ( $ url , 'https://api.wordpress.org/themes/update-check/' ) ) { return $ r ; } // Decode the JSON response. $ themes = json_decode ( $ r [ 'body' ] [ 'themes' ] ) ; unset ( $ themes -> themes -> { $ this -> product -> get_slug ( ) } ) ; // Encode the updated JSON response. $ r [ 'body' ] [ 'themes' ] = json_encode ( $ themes ) ; return $ r ; }
Disable wporg updates for premium products.

@param string $r Update payload.
@param string $url The api url.

@return mixed List of themes to check for update.
Disable wporg updates for premium products .