cache = new Prodigy_Cache(); } /** * @param string|null $key Authorization key. * * @return bool */ public function is_authorization( ?string $key ): bool { return ( get_option( Prodigy_Admin_Setup_Wizard::OPTION_STORE_KEY ) === $key ); } /** * @param int $remote_product_id * * @return object|null */ public function exists_relationship_product_id( int $remote_product_id ): ?object { return Prodigy_Products::get_product_meta_by_remote_id( Prodigy::PRODIGY_REMOTE_PRODUCT_ID, $remote_product_id ); } /** * @param string $type_slug * * @return bool */ public static function is_valid_name_slug( string $type_slug ): bool { $result = true; if ( in_array( $type_slug, self::get_list_exception_slug(), true ) ) { $result = false; } return $result; } /** * @return array */ public static function get_list_exception_slug(): array { return self::$exception_slug; } }