Hi,
During my investigation of the issue with non-visible Advanced Credit and Debit Cards processing I have discovered than in one configuration – when Autoptimize plugin has enabled option to aggregate CSS code from HTML, your plugin is not working properly – the ACDC option is not visible.
It is caused by very strange implementation of the element hiding:
printf(
'<div id="%1$s" style="display:none;">
<button type="submit" class="button alt ppcp-dcc-order-button" style="display: none;">%2$s</button>
</div>
<div id="payments-sdk__contingency-lightbox"></div>
<style id="ppcp-hide-dcc">.payment_method_ppcp-credit-card-gateway {display:none;}</style>',
esc_attr( $id ),
esc_html( $label )Due this implementation the following fragment:
<style id="ppcp-hide-dcc">.payment_method_ppcp-credit-card-gateway {display:none;}</style>Is moved to the CSS generated by Autoptimize and your scripts are unable to remove element with ID = ppcp-hide-dcc
There are two potential solutions (as Autoptimize is very popular plugin):
1) use data-noptimize=”true” in the <style> element
2) totally rewrite this code part to use a different way of hiding the elements
For me the problem is solved now after disabling option of aggregating CSS from HTML in Autoptimize
