Right now the description is formatted pretty similar to the way WooCommerce formats it in the orders page.
username(user_id - user_email) FirstName LastName
I’d like to keep that the same since that’s attached to customers and stays consistent. If someone has a large cart then the description could get out of hand if I included each products name.
But, as far as charges go, I can add metadata to include what products were purchased and the order number, etc (or have a configurable field in the options maybe?). Would that work?
What kind of information are you looking to have in there?
Thread Starter
K B
(@kiritb)
Would it be possible somehow to bring the configuration string for the description out into a template file? So that I can configure that as I choose?
Metadata containing the list of products, quantity and any other custom parameters the product might have would be useful (I suppose).
At this time I only need Product Name and Quantity.
Alright, so I added a filter for the customer and charge descriptions, they’ll come with the 1.2 release. I’ll look into adding the metadata as well, but I really don’t want to make this next release too big since there’s a lot that can break so it will probably wait for a minor release. It shouldn’t be more than a week or two for 1.2. I want to get in some good testing before I release it.
Thanks.
I just released 1.2 with filters in place for 3 fields. “s4wc_customer_description”, “s4wc_charge_description” and “s4wc_subscription_charge_description”. They all pass the current description as the first variable. “s4wc_customer_description” and “s4wc_charge_description” passform data as the second variable. “s4wc_subscription_charge_description” passes the order as the second variable. That’s pretty much all of the data that’s useful for creating descriptions.
Here’s the codex page for add_filter: http://codex.ww.wp.xz.cn/Function_Reference/add_filter
Here are the locations where I’m applying the filters: https://github.com/stezu/stripe-for-woocommerce/search?q=apply_filters&ref=cmdform
Let me know if you have any problems.
Thread Starter
K B
(@kiritb)
i just updated to 1.22 and tried to post a charge, am seeing this error.
Cannot use string offset as an array in /var/www/mysite/wp-content/plugins/stripe-for-woocommerce/classes/class-s4wc_gateway.php on line 358
I just pushed a fix for it, I didn’t bump the version so you’ll have to delete the plugin and install it again.
Let me know if it works and I’ll send out a new version in a couple of days to fix it for everyone else. Don’t want to spam people today.
Thread Starter
K B
(@kiritb)
thanks that seems to have worked.. I’ll keep testing and let you know if I find any other issues.