🐛 Hide disabled APM buttons in Standard Payments

This commit is contained in:
Philipp Stracker 2024-06-12 15:45:54 +02:00
parent 874ebbc7a0
commit f3f6765ac3
No known key found for this signature in database
3 changed files with 10 additions and 0 deletions

View file

@ -94,6 +94,11 @@ class PreviewButton {
* Will always create a new button in the DOM.
*/
render() {
// The APM button is disabled and cannot be enabled on the current page: Do not render it.
if (!this.isDynamic && !this.buttonConfig.is_enabled) {
return;
}
if (!this.domWrapper) {
if (!this.wrapper) {
console.error('Skip render, button is not configured yet');