Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Template/Basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function getHeaders(token) {
}
};

widget.options.theme = {
widget.setOptionsChunk({theme: {
components: {
BulkGateSignInView: {
defaultProps: {
Expand All @@ -153,9 +153,9 @@ function getHeaders(token) {
}
}
}
};
}});

widget.options.layout = {
widget.setOptionsChunk({layout: {
appBar: {
showLogOut: false,
logoUrl: "images/white-label/bulkgate/logo/logo-title.svg",
Expand All @@ -164,7 +164,7 @@ function getHeaders(token) {
width: "192px",
}
}
};
}});

widget.options.proxy = function (reducerName, requestData) {
let proxyData = {$escape_js($proxy)};
Expand Down
6 changes: 4 additions & 2 deletions src/Template/SendMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ public static function print(Container $di, $order, array $props = []): void
}

wp_print_inline_script_tag(<<<JS
function init_widget_message_send(widget) { widget.options.SendMessageProps = {$escape_js((object)$props)}; }
JS);
function init_widget_message_send(widget) {
widget.setOptionsChunk({props: {$escape_js((object)$props)}});
}
JS);

$jwt = $di->getByClass(Sign::class)->authenticate();

Expand Down