• Resolved bartjan93

    (@bartjan93)


    hi, the plugin is causing a fatal error:

    Uncaught TypeError: CouponURLs\App\Domain\Carts\Cart::__construct(): Argument #1 ($classic) must be of type WC_Cart, null given, called in /var/www/domainl/wp-content/plugins/coupon-urls-for-woocommerce/app/dependencies/cartdependency.php on line 23 and defined in /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/app/domain/carts/cart.php:23

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author neblabs

    (@neblabs)

    Hi, Bartjan.

    Thanks for letting me know.

    Are you getting this error on all pages? Or are you getting this error only on certain pages?

    Regards,
    Rafael Serna.

    Thread Starter bartjan93

    (@bartjan93)

    We’re getting that error on some pages. The fatal error mostly occurs when trying to use webhooks with payment gateways. Tried multiple payment plugins, but so far they’re all getting stuck on that fatal error. Full backtrace can be found below

    2024-11-25T16:23:54+00:00 Critical Uncaught TypeError: CouponURLs\App\Domain\Carts\Cart::__construct(): Argument #1 ($classic) must be of type WC_Cart, null given, called in /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/app/dependencies/cartdependency.php on line 23 and defined in /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/app/domain/carts/cart.php:23  
    Additional context
    {
    "error": {
    "type": 1,
    "file": "/var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/app/domain/carts/cart.php",
    "line": 23
    },
    "remote-logging": true,
    "backtrace": [
    "",
    "#0 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/app/dependencies/cartdependency.php(23): CouponURLs\App\Domain\Carts\Cart->__construct()",
    "#1 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/cache/existingvalueresolver.php(30): CouponURLs\App\Dependencies\CartDependency->create()",
    "#2 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/cache/existingvalueresolver.php(24): CouponURLs\Original\Cache\ExistingValueResolver->call()",
    "#3 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/cachedinstancedependencycontainer.php(29): CouponURLs\Original\Cache\ExistingValueResolver->otherwise()",
    "#4 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(43): CouponURLs\Original\Dependency\CachedInstanceDependencyContainer->get()",
    "#5 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(71): CouponURLs\Original\Dependency\DependenciesContainer->get()",
    "#6 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(333): CouponURLs\Original\Dependency\Dependent->CouponURLs\Original\Dependency\{closure}()",
    "#7 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(72): CouponURLs\Original\Collections\Collection->map()",
    "#8 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(66): CouponURLs\Original\Dependency\Dependent->dependencies()",
    "#9 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependentdependencycontainer.php(45): CouponURLs\Original\Dependency\Dependent->create()",
    "#10 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/cache/existingvalueresolver.php(30): CouponURLs\Original\Dependency\DependentDependencyContainer->CouponURLs\Original\Dependency\{closure}()",
    "#11 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/cache/existingvalueresolver.php(24): CouponURLs\Original\Cache\ExistingValueResolver->call()",
    "#12 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependentdependencycontainer.php(46): CouponURLs\Original\Cache\ExistingValueResolver->otherwise()",
    "#13 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependentdependencycontainer.php(36): CouponURLs\Original\Dependency\DependentDependencyContainer->dependencyContainer()",
    "#14 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(54): CouponURLs\Original\Dependency\DependentDependencyContainer->matches()",
    "#15 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(583): CouponURLs\Original\Dependency\DependenciesContainer->CouponURLs\Original\Dependency\{closure}()",
    "#16 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(492): CouponURLs\Original\Collections\Collection->getFilteredElements()",
    "#17 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(55): CouponURLs\Original\Collections\Collection->find()",
    "#18 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(42): CouponURLs\Original\Dependency\DependenciesContainer->resolve()",
    "#19 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(71): CouponURLs\Original\Dependency\DependenciesContainer->get()",
    "#20 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(333): CouponURLs\Original\Dependency\Dependent->CouponURLs\Original\Dependency\{closure}()",
    "#21 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(72): CouponURLs\Original\Collections\Collection->map()",
    "#22 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(66): CouponURLs\Original\Dependency\Dependent->dependencies()",
    "#23 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/automaticdependencycontainer.php(31): CouponURLs\Original\Dependency\Dependent->create()",
    "#24 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(43): CouponURLs\Original\Dependency\AutomaticDependencyContainer->get()",
    "#25 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(71): CouponURLs\Original\Dependency\DependenciesContainer->get()",
    "#26 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(333): CouponURLs\Original\Dependency\Dependent->CouponURLs\Original\Dependency\{closure}()",
    "#27 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(72): CouponURLs\Original\Collections\Collection->map()",
    "#28 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(66): CouponURLs\Original\Dependency\Dependent->dependencies()",
    "#29 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/automaticdependencycontainer.php(31): CouponURLs\Original\Dependency\Dependent->create()",
    "#30 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(43): CouponURLs\Original\Dependency\AutomaticDependencyContainer->get()",
    "#31 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(71): CouponURLs\Original\Dependency\DependenciesContainer->get()",
    "#32 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(333): CouponURLs\Original\Dependency\Dependent->CouponURLs\Original\Dependency\{closure}()",
    "#33 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(72): CouponURLs\Original\Collections\Collection->map()",
    "#34 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(66): CouponURLs\Original\Dependency\Dependent->dependencies()",
    "#35 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependentdependencycontainer.php(45): CouponURLs\Original\Dependency\Dependent->create()",
    "#36 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/cache/existingvalueresolver.php(30): CouponURLs\Original\Dependency\DependentDependencyContainer->CouponURLs\Original\Dependency\{closure}()",
    "#37 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/cache/existingvalueresolver.php(24): CouponURLs\Original\Cache\ExistingValueResolver->call()",
    "#38 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependentdependencycontainer.php(46): CouponURLs\Original\Cache\ExistingValueResolver->otherwise()",
    "#39 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependentdependencycontainer.php(36): CouponURLs\Original\Dependency\DependentDependencyContainer->dependencyContainer()",
    "#40 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(54): CouponURLs\Original\Dependency\DependentDependencyContainer->matches()",
    "#41 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(583): CouponURLs\Original\Dependency\DependenciesContainer->CouponURLs\Original\Dependency\{closure}()",
    "#42 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(492): CouponURLs\Original\Collections\Collection->getFilteredElements()",
    "#43 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(55): CouponURLs\Original\Collections\Collection->find()",
    "#44 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(42): CouponURLs\Original\Dependency\DependenciesContainer->resolve()",
    "#45 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(71): CouponURLs\Original\Dependency\DependenciesContainer->get()",
    "#46 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(333): CouponURLs\Original\Dependency\Dependent->CouponURLs\Original\Dependency\{closure}()",
    "#47 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(72): CouponURLs\Original\Collections\Collection->map()",
    "#48 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependent.php(66): CouponURLs\Original\Dependency\Dependent->dependencies()",
    "#49 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/automaticdependencycontainer.php(31): CouponURLs\Original\Dependency\Dependent->create()",
    "#50 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(43): CouponURLs\Original\Dependency\AutomaticDependencyContainer->get()",
    "#51 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/construction/events/fromdependenciescontainersubscriberfactory.php(20): CouponURLs\Original\Dependency\DependenciesContainer->get()",
    "#52 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/construction/events/hooksfactory.php(30): CouponURLs\Original\Construction\Events\FromDependenciesContainerSubscriberFactory->create()",
    "#53 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(333): CouponURLs\Original\Construction\Events\HooksFactory->CouponURLs\Original\Construction\Events\{closure}()",
    "#54 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/construction/events/hooksfactory.php(31): CouponURLs\Original\Collections\Collection->map()",
    "#55 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/collections/collection.php(333): CouponURLs\Original\Construction\Events\HooksFactory->CouponURLs\Original\Construction\Events\{closure}()",
    "#56 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/construction/events/hooksfactory.php(33): CouponURLs\Original\Collections\Collection->map()",
    "#57 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/builtin/hooksdependency.php(42): CouponURLs\Original\Construction\Events\HooksFactory->createFromGroupedSubscriberTypes()",
    "#58 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/cache/existingvalueresolver.php(30): CouponURLs\Original\Dependency\BuiltIn\HooksDependency->create()",
    "#59 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/cache/existingvalueresolver.php(24): CouponURLs\Original\Cache\ExistingValueResolver->call()",
    "#60 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/cachedinstancedependencycontainer.php(29): CouponURLs\Original\Cache\ExistingValueResolver->otherwise()",
    "#61 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependentdependencycontainer.php(40): CouponURLs\Original\Dependency\CachedInstanceDependencyContainer->get()",
    "#62 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/dependency/dependenciescontainer.php(43): CouponURLs\Original\Dependency\DependentDependencyContainer->get()",
    "#63 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/core/services/actionsservice.php(29): CouponURLs\Original\Dependency\DependenciesContainer->get()",
    "#64 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/core/services/actionsservice.php(16): CouponURLs\Original\Core\Services\ActionsService->registeredActions()",
    "#65 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/core/services.php(32): CouponURLs\Original\Core\Services\ActionsService->start()",
    "#66 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/core/services.php(24): CouponURLs\Original\Core\Services->startService()",
    "#67 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/original/core/application.php(41): CouponURLs\Original\Core\Services->start()",
    "#68 /var/www/domain/wp-content/plugins/coupon-urls-for-woocommerce/coupon-urls.php(48): CouponURLs\Original\Core\Application->start()",
    "#69 /var/www/domain/wp-includes/class-wp-hook.php(324): {closure}()",
    "#70 /var/www/domain/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()",
    "#71 /var/www/domain/wp-includes/plugin.php(517): WP_Hook->do_action()",
    "#72 /var/www/domain/wp-settings.php(726): do_action()",
    "#73 /var/www/domain/wp-config.php(66): require_once('...')",
    "#74 /var/www/domain/wp-load.php(50): require_once('...')",
    "#75 /var/www/domain/wp-blog-header.php(13): require_once('...')",
    "#76 /var/www/domain/index.php(17): require('...')",
    "#77 {main}",
    "thrown"
    ]
    }
    • This reply was modified 2 days, 4 hours ago by bartjan93.
    Plugin Author neblabs

    (@neblabs)

    Hi, Bartjan.

    I can’t reproduce this on my dev environments but I’ve published a minor update (1.3.3.1) that should take care of these exceptions. (I don’t understand why you’re getting these errors anyway since the plugin has a built-in exception handler to prevent this from happening).

    Please let me know if this has been fixed.

    Regards,
    Rafael Serna.

    • This reply was modified 1 day, 16 hours ago by neblabs.
    Thread Starter bartjan93

    (@bartjan93)

    Hi Rafael, the new update seems to solve the fatal error indeed. Thanks a lot!

    Plugin Author neblabs

    (@neblabs)

    No problem, Bartjan. I’m glad to hear that the issue has been fixed.

    If you found the plugin useful I’d appreciate if you could leave a review here: https://www.ads-software.com/support/plugin/coupon-urls-for-woocommerce/reviews/

    Regards,
    Rafael Serna.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.