generoi / sage-woocommerce

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I only use Acorn in Sage 10. Can I use this package in an environment where wp acorn is not available?

Hansanghyeon opened this issue · comments

commented

I have set up WordPress in a Docker environment. I am using the roots/sage theme for WordPress, and I have utilized Composer for the theme. I previously installed roots/acorn in the theme with the command composer require roots/acorn. Subsequently, I installed the generoi/sage-woocommerce package in the theme folder using composer require.

However, I am unable to use the wp acorn command as outlined in the README.md guide.

I did not install WordPress with Composer.

I'm unsure of what to do. Is there a solution?

commented

This command doesnt work?

wp acorn package:discover

Any output? I actually haven’t tried that in quite some time and not sure what the acorn-way is currently. I can try and reproduce next week but I might be too slow to get back to you.

Another option is https://discourse.roots.io/t/woocommerce-integration-with-generoi-sage-woocommerce/24634/2

Yet another more complicated way (which is what I do) is use an AggregateServiceProvider and add this packages serviceprovider:

<?php

namespace App\Providers;

use Illuminate\Support\AggregateServiceProvider;

class ThemeServiceProvider extends AggregateServiceProvider
{
    protected $providers = [
        \App\Providers\SageServiceProvider::class,
        \Genero\Sage\WooCommerce\WooCommerceServiceProvider::class,
    ];
}
commented

Thank you, and I was able to resolve it thanks to your reply.