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

cron: Abandoned Cart stops working with missing log write permissions #142

Open
kaittodesk opened this issue Oct 16, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@kaittodesk
Copy link
Member

Abandoned Cart CRON job stops working when the plugin doesn't have enough permissions to create (or write to) smaily-cart.txt log file in /wp-content/plugins/smaily-for-woocommerce.

Steps for reproducing

  1. Setup a WooCommerce site with at least single product.
  2. Create two Customer user accounts with invalid email address (e.g. [email protected], [email protected], etc.).
  3. Configure Smaily for WooCommerce plugin with Abandoned Cart functionality.
  4. Log in with the first Customer user and add a product to cart.
  5. Log in with the second Customer user and add a product to cart.
  6. Wait until configured Abandoned Cart cutoff time has passed (or force carts to abandoned state manually in smaily_abandoned_cart table).
  7. Run smaily_cron_abandoned_carts_email CRON job.

Expected behavior
API request to trigger abandoned cart automation is executed for both carts.

Actual behavior
API request triggering abandoned cart automation is only executed for one of the carts.

Version information
WordPress 6.6.2
WooCommerce 9.3.3
Smaily for WooCommerce 1.11.2

@kaittodesk kaittodesk added the bug Something isn't working label Oct 16, 2024
@kaittodesk
Copy link
Member Author

I think the most reasonable solution would be to replace custom file log writing with error_log function which is also mentioned in Debugging in WordPress article.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant