__( 'Sending your products via Poczta Polska? Create the shipments and generate shipping labels directly from your shop using our %1$sPoczta Polska eNadawca integration →%2$s', 'flexible-shipping' ), '', '' ) ) ); } } /** * @param array $phrases_in . */ private function create_dhl_contextual_info( array $phrases_in ) { if ( ! defined( 'WOOCOMMERCE_DHL_VERSION' ) ) { $this->add_hookable( new Flexible_Shipping_Contextual_Info( self::METHOD_TITLE_AND_METHOD_DESCRIPTION_ELEMENTS, 'dhl', $phrases_in, sprintf( // Translators: link. __( 'Sending your products via DHL? Create the shipments and generate shipping labels directly from your shop using our %1$sDHL integration →%2$s', 'flexible-shipping' ), '', '' ) ) ); } } /** * @param array $phrases_in . */ private function create_pwr_contextual_info( array $phrases_in ) { if ( ! defined( 'WOOCOMMERCE_PACZKA_W_RUCHU_VERSION' ) ) { $this->add_hookable( new Flexible_Shipping_Contextual_Info( self::METHOD_TITLE_AND_METHOD_DESCRIPTION_ELEMENTS, 'pwr', $phrases_in, sprintf( // Translators: link. __( 'Sending your products via Orlen Paczka? Create the shipments and generate shipping labels directly from your shop using our %1$sOrlen Paczka integration →%2$s', 'flexible-shipping' ), '', '' ) ) ); } } /** * @param array $phrases_in . */ private function create_inpost_contextual_info( array $phrases_in ) { if ( ! defined( 'WOOCOMMERCE_PACZKOMATY_INPOST_VERSION' ) ) { $this->add_hookable( new Flexible_Shipping_Contextual_Info( self::METHOD_TITLE_AND_METHOD_DESCRIPTION_ELEMENTS, 'inpost', $phrases_in, sprintf( // Translators: link. __( 'Sending your products via InPost? Create the shipments and generate shipping labels directly from your shop using our %1$sInPost integration →%2$s', 'flexible-shipping' ), '', '' ) ) ); } } /** * @param array $phrases_in . */ private function create_dpd_uk_contextual_info( array $phrases_in ) { if ( ! defined( 'WOOCOMMERCE_DPD_UK_VERSION' ) ) { $this->add_hookable( new Flexible_Shipping_Contextual_Info( self::METHOD_TITLE_AND_METHOD_DESCRIPTION_ELEMENTS, 'inpost', $phrases_in, sprintf( // Translators: link. __( 'Sending your products via DPD UK? Create the shipments and generate shipping labels directly from your shop using our %1$sDPD UK integration →%2$s', 'flexible-shipping' ), '', '' ) ) ); } } /** * Crate default contextual info. * * @param array $phrases_not_in . */ private function create_default_contextual_info( array $phrases_not_in ) { $this->add_hookable( new Flexible_Shipping_Contextual_Info( self::METHOD_TITLE_ELEMENT, 'other', [], $this->create_html_for_default_contextual_info(), $phrases_not_in ) ); } /** * @return string */ private function create_html_for_default_contextual_info() { if ( $this->is_base_location_country_pl() ) { return __( 'Check our further shipping integrations with DPD, DHL, InPost, eNadawca and Orlen Paczka.', 'flexible-shipping' ) . '  ' . sprintf( // Translators: link. __( '%1$sAdd integrations%2$s', 'flexible-shipping' ), '', ' →' ); } elseif ( $this->is_base_location_country_gb() ) { return __( 'Check our further shipping integration with DPD UK and FedEx / UPS live rates plugins.', 'flexible-shipping' ) . '  ' . sprintf( // Translators: link. __( '%1$sAdd integration%2$s', 'flexible-shipping' ), '', ' →' ); } else { return __( 'Check our further shipping integration with FedEx / UPS / USPS live rates plugins.', 'flexible-shipping' ) . '  ' . sprintf( // Translators: link. __( '%1$sAdd integration%2$s', 'flexible-shipping' ), '', ' →' ); } } }