mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
🐛 Hide disabled APM buttons in Standard Payments
This commit is contained in:
parent
874ebbc7a0
commit
f3f6765ac3
3 changed files with 10 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue