There is such a code found on the Internet.
There is a payment.php template and on the basis of it are the checkout and checkout / order-pay pages.
It is necessary that block a is hidden on one page and block b appears, and on the second vice versa.
It works on checkout, but not on checkout / order-pay.
Thank you in advance.
$(function(){ var p = location.pathname; if(p.indexOf('order-pay') != -1) { $('li.payment_method_cheque').hide(); $('div#wcpgsk-dialog-validation-errors').hide(); } }); $(function(){ var url = window.location.href; if (url.indexOf('checkout') > -1) { $('li.payment_method_kassa').hide(); $('div#wcpgsk-dialog-validation-errors').hide(); } });