Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCSS class not found when i call to the function #9596

Open
neerajs0532 opened this issue May 10, 2024 · 0 comments
Open

SCSS class not found when i call to the function #9596

neerajs0532 opened this issue May 10, 2024 · 0 comments

Comments

@neerajs0532
Copy link

Operating System

MAC 2 MACOS 14.4.1 (23E224)

Ruby Version

no

Jekyll Version

no

GitHub Pages Version

nothing

Expected Behavior

i expected to scuccesfully work this library and we want able to use my plugin

Current Behavior

SCSS class not found.
Fatal error: Uncaught Error: Call to undefined function compile_scss_to_css() in /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-content/plugins/custom-scss-compiler/custom-scss-compiler.php:51 Stack trace: #0 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-settings.php(473): include_once() scssphp/scssphp#1 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-config.php(103): require_once('/Users/a1d8sihz...') scssphp/scssphp#2 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-load.php(50): require_once('/Users/a1d8sihz...') scssphp/scssphp#3 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-blog-header.php(13): require_once('/Users/a1d8sihz...') scssphp/scssphp#4 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/index.php(17): require('/Users/a1d8sihz...') scssphp/scssphp#5 {main} thrown in /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-content/plugins/custom-scss-compiler/custom-scss-compiler.php on line 51
There has been a critical error on this website.

Learn more about troubleshooting WordPress.

Relevant log output

SCSS class not found.
Fatal error: Uncaught Error: Call to undefined function compile_scss_to_css() in /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-content/plugins/custom-scss-compiler/custom-scss-compiler.php:51 Stack trace: #0 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-settings.php(473): include_once() #1 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-config.php(103): require_once('/Users/a1d8sihz...') #2 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-load.php(50): require_once('/Users/a1d8sihz...') #3 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-blog-header.php(13): require_once('/Users/a1d8sihz...') #4 /Users/a1d8sihz/Local Sites/scsscompiler/app/public/index.php(17): require('/Users/a1d8sihz...') #5 {main} thrown in /Users/a1d8sihz/Local Sites/scsscompiler/app/public/wp-content/plugins/custom-scss-compiler/custom-scss-compiler.php on line 51
There has been a critical error on this website.

Learn more about troubleshooting WordPress.

Code Sample

setImportPaths(dirname($scss_file_path)); // Compile SCSS to CSS $css = $scss->compile('@import "' . basename($scss_file_path) . '";'); // Write compiled CSS to file file_put_contents($css_file_path, $css); // Enqueue the generated CSS file wp_enqueue_style('custom-style', get_template_directory_uri() . '/assets/b2b/css/b2b.css', array(), '1.0', 'all'); } // Call the function when WordPress initializes function scss_to_css_plugin_init() { compile_scss_to_css(); } add_action('init', 'scss_to_css_plugin_init');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant