ng' ), sprintf( // Translators: open and close strong tag. __( '%1$sExample 1:%2$s If the cost of the shipping method you are currently configuring should be $12, enter %3$sCost is:%4$s 12.', 'flexible-shipping' ), '', '', '', '' ), ], 'buttons' => [ [ 'label' => __( 'Previous step', 'flexible-shipping' ), 'popup' => 'step_2', 'classes' => 'btn-link', ], [ 'label' => __( 'Next step', 'flexible-shipping' ), 'popup' => 'step_4', 'classes' => 'btn-success', ], ], ]; } /** * @return array */ private function get_popup_data_step_4(): array { return [ 'id' => 'step_4', 'logo' => false, 'title' => null, 'step' => 4, 'show' => false, 'image' => 'steps/' . $this->get_locale() . '/step-4.gif', 'heading' => __( 'Add more and combine the rules!', 'flexible-shipping' ), 'text' => [ sprintf( // Translators: open and close strong tag. __( 'Configure even the most advanced shipping scenarios by adding and combining the shipping cost calculation rules. Precisely define how the shipping cost should be calculated or import and adapt one of our %1$sready-to-use scenarios%2$s to your needs. Read the %3$sFlexible Shipping plugin documentation%4$s and discover its endless possibilities!', 'flexible-shipping' ), sprintf( '', // Translators: open and close strong tag. esc_url( __( 'https://octol.io/onboarding-sc', 'flexible-shipping' ) ) ), '', sprintf( '', // Translators: open and close strong tag. esc_url( __( 'https://octol.io/onboarding-docs', 'flexible-shipping' ) ) ), '' ), ], 'buttons' => [ [ 'label' => __( 'Previous step', 'flexible-shipping' ), 'popup' => 'step_3', 'classes' => 'btn-link', ], [ 'label' => __( 'Proceed to adding the rules', 'flexible-shipping' ), 'action' => 'finish', 'classes' => 'btn-success', ], ], ]; } /** * @return string */ private function get_locale(): string { $locale = get_user_locale(); if ( 'pl_PL' === $locale ) { return $locale; } return 'en_US'; } }