Created
July 28, 2026 15:02
-
-
Save xlplugins/6c0b1f409b9d4b3dd238a472ad3c3d41 to your computer and use it in GitHub Desktop.
PayPlug + Permalink Manager Pro comp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Permalink Manager + Divi builder fix (FunnelKit checkout) | |
| * Description: Permalink Manager's custom-URI detection rewrites the query on Divi | |
| * Visual Builder requests (?et_fb) and breaks the builder on the Aero | |
| * checkout (React error #200). Skip its detection on builder requests | |
| * so WordPress resolves the URL natively. | |
| */ | |
| defined( 'ABSPATH' ) || exit; | |
| add_filter( 'permalink_manager_detect_uri', function ( $uri_parts ) { | |
| if ( isset( $_GET['et_fb'] ) || isset( $_GET['et_bfb'] ) || isset( $_GET['et_wfacp_id'] ) || isset( $_GET['wfacp_id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| $uri_parts['uri'] = ''; | |
| $uri_parts['endpoint'] = ''; | |
| $uri_parts['endpoint_value'] = ''; | |
| } | |
| return $uri_parts; | |
| }, 999 ); | |
| /** | |
| * PayPlug integrated form: re-hide the card-scheme radios (CB/Visa/Mastercard). | |
| * PayPlug hides them with `.IntegratedPayment_scheme input { display:none }` and | |
| * styles the icons instead, but FunnelKit's global checkout radio styling | |
| * (`body #wfacp-e-form .wfacp_main_form.woocommerce input[type=radio]`) has higher | |
| * specificity (ID selector) and forces them back to inline-block — so raw radio | |
| * circles appear above the card icons on the Aero checkout only. | |
| */ | |
| add_action( 'wp_head', function () { | |
| if ( ! class_exists( 'WFACP_Common' ) || ! WFACP_Common::get_id() ) { | |
| return; // FunnelKit checkout pages only | |
| } | |
| echo '<style id="wfacp-payplug-scheme-radio-fix">body #wfacp-e-form .wfacp_main_form.woocommerce .IntegratedPayment_scheme input[type=radio]{display:none !important;}</style>'; | |
| }, 999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment