Mizuho Ogino
Forum Replies Created
-
Thanks for the advice. Successfully I was able to change the name that is registered in stripe.
I wanted to change the name of the customer as well, so I have installed three filters. I have left a sample here for those who have similar problems.
add_filter( 'wc_stripe_update_customer_args', 'convert_name_in_customer_args_to_local' );
add_filter( 'wc_stripe_customer_args', 'convert_name_in_customer_args_to_local' );
function convert_name_in_customer_args_to_local( $args ){
$user_object = get_user_by( 'email', $args['email'] );
if ( is_object( $user_object ) ) {
$switch_locale = isset( $user_object->locale ) && get_locale() != $user_object->locale ? $user_object->locale : '';
$customer = new WC_Customer( $user_object->ID );
if ( $switch_locale ){
switch_to_locale( $switch_locale );
}
$args['name'] = sprintf( _x( '%1$s %2$s', 'full name', 'woocommerce' ), $customer->get_first_name(), $customer->get_last_name() );
if ( $switch_locale ){
restore_previous_locale();
}
}
return $args;
}add_filter( 'wc_stripe_payment_intent_args', 'convert_name_in_payment_intent_args_to_local', 10, 2 );
function convert_name_in_payment_intent_args_to_local( $args, $order ){
$user_object = $order->get_user();
if ( is_object( $user_object ) ) {
$switch_locale = isset( $user_object->locale ) && get_locale() != $user_object->locale ? $user_object->locale : '';
if ( $switch_locale ){
switch_to_locale( $switch_locale );
}
$args['shipping']['name'] = sprintf( _x( '%1$s %2$s', 'full name', 'woocommerce' ), $order->get_shipping_first_name(), $order->get_shipping_last_name() );
if ( $switch_locale ){
restore_previous_locale();
}
}
return $args;
}- This reply was modified 8 months, 2 weeks ago by Mizuho Ogino.
- This reply was modified 8 months, 2 weeks ago by James Huff.
Thank you for your thoughtful response!!
I understand about the specifications.===========
I am also very glad to hear that you will consider localization, I have updated GlotPress with the Japanese localization data and hope to see more users from Japan in the future.
Thank you for your consideration.
WooCommerce triggers several filters.
As you say, there are several ways to do this. So I have no problem getting this feature.
I’ll mark as resolved.Forum: Plugins
In reply to: [Payment Plugins for Stripe WooCommerce] Error on KONBINI paymentThanks a lot !!!
As you indicated, the format of the phone number was the cause of the error message.With the error message returned by Stripe, the user would not know how to correct it. (Besides, the message is not in Japanese.) Also, once submitted to Stripe, a failed order is created. For these reasons, we would like to validate the phone number on the woocommerce side before submitting.
Forum: Plugins
In reply to: [Payment Plugins for Stripe WooCommerce] Error on KONBINI paymentYes, there is a log. I will blindfold with xxx / 000 where it might fall under personal information. If it’s difficult to determine, please provide me with your contact information so I can send you the original text.
invalid_request_error - payment_method_options[konbini][confirmation_number] Invalid string: 0000000000...0000000000; must be at most 11 characters
{ "shipping": { "address": { "line2": "xxxxxxx", "line1": "xxxxxxx", "state": "JP00", "city": "xxxxxxx", "postal_code": "000-0000", "country": "JP" }, "name": "xxxxx xxxxx" }, "capture_method": "automatic", "description": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx", "metadata": { "gateway_id": "stripe_konbini", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0", "webhook_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx", "product_23331": "xxxxxxxxxxxxxxxxxxxxx", "partner": "PaymentPlugins", "user_id": "3", "created": "1703477391", "order_id": "24096", "ip_address": "000.000.000.000" }, "confirmation_method": "automatic", "payment_method_types": { "0": "konbini" }, "currency": "JPY", "customer": "cus_xxxxxxxxxxxx", "payment_method_options": { "konbini": { "confirmation_number": "000000000000", "expires_after_days": "7", "product_description": "Order 24096" } }, "confirm": "false", "amount": "1270", "expand": { "0": "payment_method" } }
And the response body is below.
{ "error": { "message": "Invalid string: 0000000000...0000000000; must be at most 11 characters", "param": "payment_method_options[konbini][confirmation_number]", "request_log_url": "https://dashboard.stripe.com/acct_xxxxxxxxxxxxxxxx/logs/req_xxxxxxxxxxxxx?t=1703477392", "type": "invalid_request_error" } }
The confirmation_number is a registered 12-digit number. Hope this gives you a clue.
Thank you.- This reply was modified 1 year, 2 months ago by Mizuho Ogino.
- This reply was modified 1 year, 2 months ago by Mizuho Ogino.
- This reply was modified 1 year, 2 months ago by Mizuho Ogino.
Thanks for the response @mrclayton !
I will submit a request to stripe.Thanks for the reply, @mrclayton
I am attaching a screenshot.Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] Database errorsHi.
Most hosting providers offer 1M sort_buffer_size. I think it’s enough for the ordinary website.I am having exactly the same issue with you and this has happened because the site is made by woocommerce and there are dozens of html emails a day. The 1M sort memory causes the error on the web site and phpMyAdmin too.
I really love this plugin and want to continue using it. If possible, please update to the specification using Ajax when an user views details.
Thank you. I patched the file.
Forum: Plugins
In reply to: [Kuroneko Web Collect] エラーコード[A081010702]返信ありがとうございます。
調べましたところ、ご指摘の通り、Eメール内で TEL:000-000-0000 のように出力するために get_billing_phone() にかかっていたフィルターが原因で桁数制限に引っかかっていたようでした。
フィルターをサンキューページとメール内のアクションに限定sていトリガーすることで回避しました。Forum: Plugins
In reply to: [PDF Image Generator] Generated HTML at insertHi Myshock.
Thank you for trying the plugin.
Did you confirm the LINK-TO field is set to PDF media file?
Forum: Plugins
In reply to: [PDF Image Generator] Spaces in file namesHi chototoro.
It’s a helpful information.
Line-434 problem is also reported by the other user.
The next version will support the issue and release as soon as it’s ready.Thank you!
Forum: Plugins
In reply to: [PDF Image Generator] CMYK PDFs don’t get converted to RGB thumbnailsHi hhgk.
Thank you for reporting.
As you pointed out, this is a little but significant bug!
I will check the code, and release the fixed version as soon as it’s ready.Thank you.
Forum: Plugins
In reply to: [PDF Image Generator] HTTP errorYes, some notice were fixed in 1.5.4.
I hope it resolve the issue.Forum: Plugins
In reply to: [PDF Image Generator] Wrong image generatedHi benincasapcm.
The plugin can’t help to resolve such issues.
I think the problem is caused by ImageMagick version or the file itself. Have you tried to upload other pdfs?