PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | jetpack_vendor/automattic/jetpack-masterbar/src/nudges/additional-css/class-wpcom-additional-css-manager.php +17 -3 13.6.2 → 16.3 View file →
@@ -35,11 +35,14 @@
35 35 *
36 36 * @param \WP_Customize_Manager $wp_customize_manager The core customize manager.
37 37 */
38 38 public function register_nudge( \WP_Customize_Manager $wp_customize_manager ) {
39 - $nudge_url = $this->get_nudge_url();
40 - $nudge_text = __( 'Purchase the Explorer plan to<br> activate CSS customization', 'jetpack-masterbar' );
39 + $plan_name = $this->get_plan()->product_name_short;
41 40
41 + $nudge_url = $this->get_nudge_url();
42 + /* translators: %s is the plan name. */
43 + $nudge_text = sprintf( __( 'Purchase the %s plan to<br> activate CSS customization', 'jetpack-masterbar' ), $plan_name );
44 +
42 45 $nudge = new CSS_Customizer_Nudge(
43 46 $nudge_url,
44 47 $nudge_text,
45 48 'jetpack_custom_css'
@@ -53,7 +56,18 @@
53 56 *
54 57 * @return string
55 58 */
56 59 private function get_nudge_url() {
57 - return '/checkout/' . $this->domain . '/premium';
60 + return '/checkout/' . $this->domain . '/' . $this->get_plan()->path_slug;
61 + }
62 +
63 + /**
64 + * Get the plan.
65 + *
66 + * @return mixed
67 + */
68 + protected function get_plan() {
69 + $plan_slug = apply_filters( 'wpcom_customize_css_plan_slug', 'value_bundle' );
70 +
71 + return \Automattic\Jetpack\Plans::get_plan( $plan_slug );
58 72 }
59 73 }