Title: simppa999's Replies | WordPress.org

---

# simppa999

  [  ](https://wordpress.org/support/users/simppa999/)

 *   [Profile](https://wordpress.org/support/users/simppa999/)
 *   [Topics Started](https://wordpress.org/support/users/simppa999/topics/)
 *   [Replies Created](https://wordpress.org/support/users/simppa999/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/simppa999/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/simppa999/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/simppa999/engagements/)
 *   [Favorites](https://wordpress.org/support/users/simppa999/favorites/)

 Search replies:

## Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Print Invoice & Delivery Notes for WooCommerce] Attach Default template invoice to emails](https://wordpress.org/support/topic/attach-default-template-invoice-to-emails/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [1 year ago](https://wordpress.org/support/topic/attach-default-template-invoice-to-emails/#post-18590470)
 * Hello [@priyankajagtap](https://wordpress.org/support/users/priyankajagtap/) ,
   and sorry for late replay. Your screenshots are exactly what I got also. But 
   it is wrong, as I have custom woocommerce templates for receipt that is working
   well when printing on order or orders list. Under child themes woocommerce/print-
   order. This template should apply also on when attaching to emails. Please.
    -  This reply was modified 1 year ago by [simppa999](https://wordpress.org/support/users/simppa999/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooPayments: Integrated WooCommerce Payments] Please add payment gateway title for Klarna](https://wordpress.org/support/topic/please-add-payment-gateway-title-for-klarna/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/please-add-payment-gateway-title-for-klarna/#post-18320558)
 * For me it seems more like a bug as all payment’s methods should have title attribute
   filled.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooPayments: Integrated WooCommerce Payments] Please add payment gateway title for Klarna](https://wordpress.org/support/topic/please-add-payment-gateway-title-for-klarna/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/please-add-payment-gateway-title-for-klarna/#post-18317621)
 * Hello, please look on this site: [WooCommerce Code Reference](https://woocommerce.github.io/code-reference/classes/WC-Payment-Gateway.html#property_title)
   and look property called $title. Please add value for that “title” on Klarna 
   payment gateway. As its now empty.
    -  This reply was modified 1 year, 5 months ago by [simppa999](https://wordpress.org/support/users/simppa999/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooPayments: Integrated WooCommerce Payments] Please add payment gateway title for Klarna](https://wordpress.org/support/topic/please-add-payment-gateway-title-for-klarna/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/please-add-payment-gateway-title-for-klarna/#post-18313143)
 * If you print out the payment method gateway object the property called “title”
   is empty. And that cause following WPML function to return empty payment method
   name, so please fix it by adding the title for Klarna payment method. It could
   be as field on plugin settings or just static “Klarna” would do it.
 *     ```wp-block-code
       <?phpuse WPML\FP\Fns;class WCML_Payment_Method_Filter {	/** @var array  */	private $payment_gateway_cache = [];	public function add_hooks() {		add_filter(			'woocommerce_order_get_payment_method_title',			Fns::withoutRecursion( Fns::identity(), [ $this, 'payment_method_string' ] ),			10,			2		);	}	public function payment_method_string( $title, $object ) {		if ( ! empty( $title ) && $object->get_id() ) {			$payment_gateway = $this->get_payment_gateway( $object->get_id() );			if ( isset( $_POST['payment_method'] ) && $payment_gateway->id !== $_POST['payment_method'] && WC()->payment_gateways() ) {				$payment_gateways = WC()->payment_gateways()->payment_gateways();				if ( isset( $payment_gateways[ $_POST['payment_method'] ] ) ) {					$payment_gateway = $payment_gateways[ $_POST['payment_method'] ];				}			}			if ( $payment_gateway ) {				$settings = maybe_unserialize( get_option( 'woocommerce_' . $payment_gateway->id . '_settings' ) );				$title = apply_filters(					'wpml_translate_single_string',					! empty( $settings['title'] ) ? $settings['title'] : $payment_gateway->title,					'admin_texts_woocommerce_gateways',					$payment_gateway->id . '_gateway_title'				);				if ( $title === $payment_gateway->title ) {					if ( 'cheque' === $payment_gateway->id && $title === $payment_gateway->title ) {						$title = _x( $payment_gateway->title, 'Check payment method', 'woocommerce' );					} else {						$title = __( $payment_gateway->title, 'woocommerce' );					}				}			}		}		return $title;	}
       ```
   
    -  This reply was modified 1 year, 5 months ago by [simppa999](https://wordpress.org/support/users/simppa999/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Print Invoice & Delivery Notes for WooCommerce] Print based customers language](https://wordpress.org/support/topic/print-based-customers-language/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/print-based-customers-language/#post-18305476)
 * Hello, actually I managed to resolve the issue easily using WPML functions on
   invoice templates.
   Get order language that is saved by WPML:get_post_meta($order-
   >get_id(), ‘wpml_language’, true);
 * Set that language afterwards:
   do_action( ‘wpml_switch_language’, $lang );In the
   end revert that setting to the current language.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posti Shipping] Seurantakoodit ei mukana kuittausviestissä](https://wordpress.org/support/topic/seurantakoodit-ei-mukana-kuittausviestissa/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/seurantakoodit-ei-mukana-kuittausviestissa/#post-18104422)
 * Seurantakoodin lisäyksen myös cronin kautta tehdyissä posteissa saa toimimaan
   lisäämällä koodiin (core/class-core.php) riville 197 “|| wp_doing_cron()”:
 * if ( is_admin() || wp_doing_cron()) {
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Scheduled & Automatic Order Status Controller for WooCommerce] hooks not fired on order complete email](https://wordpress.org/support/topic/hooks-not-fired-on-order-complete-email/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/hooks-not-fired-on-order-complete-email/#post-17876620)
 * Thank you for replay. Still not working, but need to try debug more.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posti Shipping] Seurantakoodit ei mukana kuittausviestissä](https://wordpress.org/support/topic/seurantakoodit-ei-mukana-kuittausviestissa/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/seurantakoodit-ei-mukana-kuittausviestissa/#post-17874803)
 * Tämä ongelma liittyy siihen jos tilaa vaihdetaan cronilla, eli pitäs lisätä seurntakoodin
   lisäys myös wp_doing_cron() tapauksissa eikä vain is_admin() tilanteessa. ks.
   [hooks not fired on order complete email | WordPress.org](https://wordpress.org/support/topic/hooks-not-fired-on-order-complete-email/#post-17872480)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Scheduled & Automatic Order Status Controller for WooCommerce] hooks not fired on order complete email](https://wordpress.org/support/topic/hooks-not-fired-on-order-complete-email/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/hooks-not-fired-on-order-complete-email/#post-17872480)
 * You are correct, the tracking codes are attached when running the cron manually.
   So the change needed to be done in “posti shipping” plugin.
 * Do you have good suggestion how to include plugin hooks “_$this**->**admin **
   =** $this**->**load\_admin\_class()_” only for cron, and not always? Please.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Scheduled & Automatic Order Status Controller for WooCommerce] hooks not fired on order complete email](https://wordpress.org/support/topic/hooks-not-fired-on-order-complete-email/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/hooks-not-fired-on-order-complete-email/#post-17865380)
 * Hello and thank you for replay.
 * The plugin is this: [https://wordpress.org/plugins/posti-shipping/](https://wordpress.org/plugins/posti-shipping/)
   
   The action is this: [class-admin.php in posti-shipping/trunk/core – WordPress Plugin Repository](https://plugins.trac.wordpress.org/browser/posti-shipping/trunk/core/class-admin.php#L48)
   The function is this: [class-admin.php in posti-shipping/trunk/core – WordPress Plugin Repository](https://plugins.trac.wordpress.org/browser/posti-shipping/trunk/core/class-admin.php#L1746)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Scheduled & Automatic Order Status Controller for WooCommerce] Condition based on meta](https://wordpress.org/support/topic/condition-based-on-meta/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/condition-based-on-meta/#post-17818909)
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Google for WooCommerce] Custom product image mapping](https://wordpress.org/support/topic/custom-product-image-mapping/)
 *  Thread Starter [simppa999](https://wordpress.org/support/users/simppa999/)
 * (@simppa999)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/custom-product-image-mapping/#post-17818895)
 * Thank you for replay. So need to stick old plugin that I was using.

Viewing 12 replies - 1 through 12 (of 12 total)