Created
February 3, 2026 07:24
-
-
Save xlplugins/4429a5b0cbdf6a237590ab9ebae67dad to your computer and use it in GitHub Desktop.
Greenshift + FunnelKit CSS Fix
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
| add_action( 'wfacp_checkout_page_found', function( $wfacp_id ) { | |
| // Only run if Greenshift is active | |
| if ( ! function_exists( 'gspb_get_final_css' ) ) { | |
| return; | |
| } | |
| // Get queried object ID (WooCommerce checkout page) | |
| $queried_id = get_queried_object_id(); | |
| // If they're the same, Greenshift will handle it | |
| if ( $queried_id === $wfacp_id ) { | |
| return; | |
| } | |
| // Get Greenshift CSS from FunnelKit checkout page | |
| $gspb_css_content = get_post_meta( $wfacp_id, '_gspb_post_css', true ); | |
| if ( empty( $gspb_css_content ) ) { | |
| return; | |
| } | |
| // Process and enqueue the CSS | |
| $final_css = gspb_get_final_css( $gspb_css_content ); | |
| if ( ! empty( $final_css ) ) { | |
| wp_register_style( 'greenshift-funnelkit-post-css', false ); | |
| wp_enqueue_style( 'greenshift-funnelkit-post-css' ); | |
| wp_add_inline_style( 'greenshift-funnelkit-post-css', $final_css ); | |
| } | |
| }, 5 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment