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

Notice: Array to string conversion in JsSnippet.php on line 108 #2

Closed
raamdev opened this Issue Sep 3, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@raamdev
Copy link
Contributor

raamdev commented Sep 3, 2016

The customAttributes() method in src/includes/classes/Utils/JsSnippet.php is producing the following:

Notice: Array to string conversion in /app/src/wp-content/plugins/woocommerce-intercom-pro/src/includes/classes/Utils/JsSnippet.php on line 108

Notice: Array to string conversion in /app/src/wp-content/plugins/woocommerce-intercom-pro/src/includes/classes/Utils/JsSnippet.php on line 108

Notice: Array to string conversion in /app/src/wp-content/plugins/woocommerce-intercom-pro/src/includes/classes/Utils/JsSnippet.php on line 108

Notice: Array to string conversion in /app/src/wp-content/plugins/woocommerce-intercom-pro/src/includes/classes/Utils/JsSnippet.php on line 108

Notice: Array to string conversion in /app/src/wp-content/plugins/woocommerce-intercom-pro/src/includes/classes/Utils/JsSnippet.php on line 108

Notice: Array to string conversion in /app/src/wp-content/plugins/woocommerce-intercom-pro/src/includes/classes/Utils/JsSnippet.php on line 108

https://github.com/websharks/woocommerce-intercom-pro/blob/dev/src/includes/classes/Utils/JsSnippet.php#L108

This is because wc_get_customer_available_downloads() returns an array of arrays.

@raamdev

This comment has been minimized.

Copy link
Contributor

raamdev commented Sep 9, 2016

Next Release Changelog:

  • Bug Fix: Fixed a "Notice: Array to string conversion" bug when getting available user downloads from WooCommerce. See Issue #2.

@raamdev raamdev closed this Sep 9, 2016

raamdev added a commit to wpsharks/woocommerce-intercom that referenced this issue Sep 9, 2016

Phing release of v160909.7530 with the following changes:
- **Bug Fix**: Fixed a "Notice: Array to string conversion" bug when getting available user downloads from WooCommerce. See [Issue #2](wpsharks/woocommerce-intercom-pro#2).
- **Enhancement**: The `total_spent` Custom Attribute is now padded to two decimal places, ensuring that a zero value gets passed as `0.00` and values that end in a zero include the padded zero (e.g., `5.50` instead of `5.5`). See [this commit](wpsharks/woocommerce-intercom-pro@86f8ac4).
- Updated WP PHP RV to v160824.6416.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment