taak7
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Square] woocommerce_order_status_refunded run twicehi, @aashik.
Thanks a lot!!!
Forum: Plugins
In reply to: [WooCommerce Square] woocommerce_order_status_refunded run twiceThanks @aashik and sorry for the confusion.
I must have missed your sentence..
Are you referring to the multiple order status changed notes?
YES!
I want to write my custom code that runs when an order is refunded.
I tried that using hookwoocommerce_order_status_refunded.
But this hook runs twice when the order refunded using square.
So my code runs twice, too…Is this woocommerce for square’s bug?
Do you have any idea to make my code works only once?
Forum: Plugins
In reply to: [WooCommerce Square] woocommerce_order_status_refunded run twiceHi, there!
Thank you for your image.
I can see the same behavior of changing status in your image.
And I can see that increasing item event ran only once.I would like to write custom event when the order refunded.
When i using hook “woocommerce_order_status_refunded”, event ran twice.
If you know the other hook, please let me know…thank you.
Forum: Plugins
In reply to: [WooCommerce Square] woocommerce_order_status_refunded run twiceForum: Plugins
In reply to: [WooCommerce Square] woocommerce_order_status_refunded run twicethank you, @aashik.
1. Bought a item with credit card (Square) as a customer.
2. Opened WooCommerce order list of WordPress Admin page.
3. Selected the order.
4. Clicked Refund button. -> image
5. Put an amount of refund. -> image
6. Clicked “refund with Square” button. -> image
7. You will see the same transaction memo. -> image* “処理中から払い戻しに変更しました” means “changed to refunded from processing”
Forum: Plugins
In reply to: [WooCommerce Square] how to translate the error messagesHi @fernashes.
Thank you for your response.
I’ll try to find the other way.By the way, I can’t see Github link.
It’s not found page…Forum: Plugins
In reply to: [WooCommerce Square] hot to change “Place order” text?And i found another way without plugin.
add_filter('woocommerce_available_payment_gateways', 'custom_available_payment_gateways', 100); function custom_available_payment_gateways($payment) { $payment['square_credit_card']->order_button_text = 'ABC'; }thanks.
Forum: Plugins
In reply to: [WooCommerce Square] hot to change “Place order” text?It worked with plugin “Booster”.
thanks.
Forum: Plugins
In reply to: [WooCommerce Square] hot to change “Place order” text?hi @yukikatayama, thanks for your response.
i tried to use the plugin, but i couldn’t find the text domain “woocommerce-plugin-framework”.
could you tell me if know about this?I tried “gettext” filter like this.
add_filter('gettext', 'custom_text', 100, 3); function custom_text($translation, $text, $domain) { return 'ABC'; }almost all text was changed but “Place order” was still alive…
can you change with Loco Translate even this situation?By the way, I found the way to change the text!!!
add_filter ('woocommerce_order_button_html', 'custom_order_button_html', 100); function custom_order_button_html($button_html) { $button_html = str_replace('id="place_order"', 'id="place_order2"', $button_html); return $button_html; }but i’m afraid of that changing id may trigger some trouble…
does anybody have better way?thanks.