Hi Pablo, Thank you for the suggestion but I could not get it to work as expected.
So I simply copied the frontend functions direct from the pluginfolder,
now it works fine with the use of some woocommerce native php function if the page reloads “wc_add_notice( __(‘hello world’, ‘mytheme’ ), ‘info’ );”:
—
function showStatusMessage (text, msgtype) {
if (typeof text !== 'string' || typeof msgtype !== 'string') {
console.error('Invalid input: text and msgtype must be strings')
return
}
jQuery('#ttt-pnwc-notice').find('.ttt-pnwc-content').empty()
const value = {
type: msgtype,
message: text
}
jQuery('#ttt-pnwc-notice .ttt-pnwc-content').append(`
<div class='ttt-pnwc-notice ${value.type} ttt-static'>
<i class='ttt-pnwc-notice-icon default-icon'></i>
<div class='ttt-pnwc-message'>${value.message}</div>
</div>
`)
MicroModal.show('ttt-pnwc-notice')
setTimeout(() => {
MicroModal.close()
}, 4000)
}