: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
isHidden: ! canInstallAddons,
this.$$confirm.prop( 'disabled', true )
.html( spinner + wpforms_education.installing );
.prop( 'disabled', true );
app.installAddon( $button, this );
text: wpforms_education.cancel,
* Install addon via AJAX.
* @param {jQuery} $button Button object.
* @param {Object} previousModal Previous modal instance.
installAddon( $button, previousModal ) {
const url = $button.data( 'url' ),
pluginType = $button.data( 'type' ),
nonce = $button.data( 'nonce' ),
hideOnSuccess = $button.data( 'hide-on-success' );
wpforms_education.ajax_url,
action: 'wpforms_install_addon',
app.saveModal( res.data.msg );
if ( 'object' === typeof res.data ) {
message = wpforms_education.addon_error;
icon: 'fa fa-exclamation-circle',
text: wpforms_education.close,
* Get upgrade modal width.
* @param {boolean} isVideoModal Upgrade a modal type (with video or not).
* @return {string} Modal width in pixels.
getUpgradeModalWidth( isVideoModal ) {
const windowWidth = $( window ).width();
if ( windowWidth <= 300 ) {
if ( windowWidth <= 750 ) {
if ( ! isVideoModal || windowWidth <= 1024 ) {
return windowWidth > 1070 ? '1040px' : '994px';
* @param {string} title Modal title.
* @param {string} content Modal content.
errorModal( title, content ) {
icon: 'fa fa-exclamation-circle',
text: wpforms_education.close,
// Provide access to public functions/properties.
}( document, window, jQuery ) );
WPFormsEducation.core.init();