# learnpress/4.4.0/assets/src/js/lpToastify.js

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.0. 35 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.0/code/assets/src/js/lpToastify.js
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.0/raw/assets/src/js/lpToastify.js
- Modified: 2026-06-17T11:04:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.0/code/assets/src/js/lpToastify.js#L10-L20`.

```javascript
/**
 * Utils functions
 *
 * @param url
 * @param data
 * @param functions
 * @since 4.3.0
 * @version 1.0.0
 */
import Toastify from 'toastify-js';
import 'toastify-js/src/toastify.css';

const argsToastify = {
	text: '',
	gravity: lpData.toast.gravity, // `top` or `bottom`
	position: lpData.toast.position, // `left`, `center` or `right`
	className: `${ lpData.toast.classPrefix }`,
	close: lpData.toast.close == 1,
	stopOnFocus: lpData.toast.stopOnFocus == 1,
	duration: lpData.toast.duration,
};
export const show = ( message, status = 'success', argsCustom ) => {
	let args = argsToastify;
	if ( argsCustom ) {
		args = { ...args, ...argsCustom };
	}

	const toastify = new Toastify( {
		...args,
		text: message,
		className: `${ lpData.toast.classPrefix } ${ status }`,
	} );
	toastify.showToast();
};

```
