utils->is_step_post_type() ) { return; } $page_template = get_post_meta( _get_wcf_step_id(), '_wp_page_template', true ); if ( _wcf_supported_template( $page_template ) ) { add_action( 'wp_enqueue_scripts', array( $this, 'gutenberg_block_color_support' ), 21 ); if ( class_exists( 'Astra_Builder_Header' ) ) { $astra_builder_header = Astra_Builder_Header::get_instance(); remove_action( 'wp_footer', array( $astra_builder_header, 'mobile_popup' ) ); remove_action( 'wp_footer', array( $astra_builder_header, 'mobile_cart_flyout' ) ); } // Removed the scroll to top button if template type is not default. if ( class_exists( 'Astra_Ext_Scroll_To_Top_Markup' ) ) { $astra_ext_scroll_to_top = Astra_Ext_Scroll_To_Top_Markup::get_instance(); remove_action( 'wp_footer', array( $astra_ext_scroll_to_top, 'html_markup_loader' ) ); } } } /** * Function to add/remove the actions/hooks on wp action. * * @since 1.5.7 * * @return void */ public function cartflows_load_wp_actions_for_astra() { // Return if not the CartFlows page. if ( ! wcf()->utils->is_step_post_type() ) { return; } $page_template = get_post_meta( _get_wcf_step_id(), '_wp_page_template', true ); if ( _wcf_supported_template( $page_template ) ) { return; } add_action( 'wp_enqueue_scripts', array( $this, 'astra_compatibility_external_css' ), 101 ); // Re-add the WooCommerce's styles & script swhich are form Astra. $astra_woo = Astra_Woocommerce::get_instance(); add_filter( 'woocommerce_enqueue_styles', array( $astra_woo, 'woo_filter_style' ), 9999 ); } /** * Function to add theme color on frontend. * * @since 1.10.0 * * @return void */ public function gutenberg_block_color_support() { if ( class_exists( 'Astra_Global_Palette' ) && function_exists( 'astra_parse_css' ) ) { $palette_style[':root'] = Astra_Global_Palette::generate_global_palette_style(); $css = astra_parse_css( $palette_style ); wp_add_inline_style( 'wcf-normalize-frontend-global', $css ); } } /** * Load the CSS * * @since 1.5.7 * * @return void */ public function astra_compatibility_external_css() { wp_enqueue_style( 'wcf-checkout-astra-compatibility', CARTFLOWS_URL . 'compatibilities/themes/astra/css/astra-compatibility.css', '', CARTFLOWS_VER ); } } /** * Kicking this off by calling 'get_instance()' method */ Cartflows_Astra_Compatibility::get_instance(); endif;