Troubleshooting Persian Date Plugins and Weekly Events Errors
Overview
Some users may encounter PHP warnings or critical errors in Ultimate Member when using Persian date plugins (e.g., persian-woocommerce). These plugins may override WordPress’s default start_of_week
option with a non-integer value. As a result, scheduled weekly events in Ultimate Member can fail because PHP functions like mktime()
require integers.
Common Symptoms
When this issue occurs, you may see warnings or fatal errors in your error logs, such as:
PHP Warning: A non-numeric value encountered in .../ultimate-member/includes/core/class-cron.php on line 83
PHP Warning: mktime() expects parameter 4 to be int, string given ...
Cause
The issue happens when a plugin changes WordPress’s start of week setting (get_option( 'start_of_week' )
) from its expected numeric value (0–6) to a string. This causes Ultimate Member’s cron tasks to break.
Solution
Fixed in Ultimate Member 2.10.6
Ultimate Member now validates that start_of_week
is always an integer before using it in cron logic.
Make sure you are using Ultimate Member 2.10.6 or later.
If you still see issues
- Check your WordPress settings
- Go to Settings → General → Start of the week.
- Ensure it is set to a valid day (e.g., Sunday = 0, Monday = 1).
- Check for active Persian date plugins
- Plugins like Persian WooCommerce may change this value.
- If issues persist, temporarily deactivate the plugin to confirm.
- Update both plugins
- Keep Ultimate Member and your Persian date plugin up to date to ensure compatibility.
Summary
- The error is caused by Persian date plugins overriding the
start_of_week
option with a non-integer. - Ultimate Member fixed this issue in v2.10.6.
- Users should check Settings → General and review active Persian date plugins if issues continue.