Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • The issue is exist in both free and premium versions, and also in a clean wordpress setup.

    This plugin doesn’t work at all. All prices are 0 in cart.

    Thread Starter xoex

    (@xoex)

    I propose this way of enqueuing styles.

    public function render_server_side_css() {
    		if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) ) {
    			//global $post;
    			global $wp_query;
    			$posts = $wp_query->get_posts();
    
    			if (!is_array($posts))
    			{
    				return;
    			}
    			
    			$styles = '';
    
    			foreach ($posts as $post)
    			{
    				if ( ! is_object( $post ) ) {
    					continue;
    				}
    
    				$blocks = parse_blocks( $post->post_content );
    
    				if ( ! is_array( $blocks ) || empty( $blocks ) ) {
    					continue;
    				}
    
    				$css = $this->cycle_through_blocks( $blocks, $post->ID );
    
    				if ( !empty( $css ) ) {
    					$styles .= $css;
    				}
    			}
    
    			if (empty($styles))
    			{
    				return;
    			}
    
    			$style  = "\n" . '<style type="text/css" media="all">' . "\n";
    			$style .= $styles;
    			$style .= "\n" . '</style>' . "\n";
    
    			echo $style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    		}
    	}
    • This reply was modified 1 year, 12 months ago by xoex.
    Thread Starter xoex

    (@xoex)

    I found a fix for this, but I think it shouldn’t be default at first place.

    Add this line to theme.json :

    "link": {
    	"typography": {
    		"textDecoration": "none"
        }
    }

    This should be add under “elements” section under “styles” section. something like this :

    • styles
    • elements
    • link
Viewing 3 replies - 1 through 3 (of 3 total)