Optimizing the Photovoltaic (PV) hosting capacity (HC) considering the irradiance's variability properly and the load during the day represents a critical matter. Typically, the high PV HC results in overvoltage and high voltage fluctuations at the point of common coupling (PCC) with the utility. In this paper, a new algorithm is proposed for enhancing PV HC by considering the smart inverter functions to overcome key PCC issues. The Volt-Var and dynamic reactive current functions of the smart inverter are suggested to increase the PV HC. Furthermore, the time of use tariff is utilized for mitigating the duck curve issue at the utility by reducing the peak to valley difference of the substation net load curve. Quasi-static time-series simulations are performed using the OpenDSS program to prove the effectiveness of the proposed algorithm. The proposed algorithm is validated by extensive numerical analysis on the standard IEEE 123 node test feeder. Deduced outcomes are very encouraging in mitigating the overvoltage, reducing the energy losses, limiting the considerable number of on-load tap changes, and alleviating the high voltage fluctuations.