• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 6744816013

03 Nov 2023 11:52AM UTC coverage: 49.287% (+0.06%) from 49.232%
6744816013

push

github

enricobattocchi
Merge branch 'release/21.6' into trunk

36 of 41 new or added lines in 2 files covered. (87.8%)

525 existing lines in 1 file now uncovered.

13238 of 26859 relevant lines covered (49.29%)

3.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.33
/src/presenters/admin/woocommerce-beta-editor-presenter.php
1
<?php
2

3
namespace Yoast\WP\SEO\Presenters\Admin;
4

5
use Yoast\WP\SEO\Helpers\Short_Link_Helper;
6
use Yoast\WP\SEO\Presenters\Abstract_Presenter;
7

8
/**
9
 * Class Woocommerce_Beta_Editor_Presenter.
10
 */
11
class Woocommerce_Beta_Editor_Presenter extends Abstract_Presenter {
12

13
        /**
14
         * The short link helper.
15
         *
16
         * @var Short_Link_Helper
17
         */
18
        protected $short_link_helper;
19

20
        /**
21
         * Woocommerce_Beta_Editor_Presenter constructor.
22
         *
23
         * @param Short_Link_Helper $short_link_helper The short link helper.
24
         */
25
        public function __construct( Short_Link_Helper $short_link_helper ) {
NEW
26
                $this->short_link_helper = $short_link_helper;
×
27
        }
28

29
        /**
30
         * Returns the notification as an HTML string.
31
         *
32
         * @return string The notification in an HTML string representation.
33
         */
34
        public function present() {
35
                $notification_text  = '<p>';
2✔
36
                $notification_text .= $this->get_message();
2✔
37
                $notification_text .= '</p>';
2✔
38

39
                return $notification_text;
2✔
40
        }
41

42
        /**
43
         * Returns the message to show.
44
         *
45
         * @return string The message.
46
         */
47
        protected function get_message() {
48
                return \sprintf(
2✔
49
                        '<strong>%1$s</strong> %2$s',
2✔
50
                        \esc_html__( 'Compatibility issue: Yoast SEO is incompatible with the beta WooCommerce product editor.', 'wordpress-seo' ),
2✔
51
                        \sprintf(
2✔
52
                                /* translators: 1: Yoast SEO, 2: Link start tag to the Learn more link, 3: Link closing tag. */
53
                                \esc_html__( 'The %1$s interface is currently unavailable in the beta WooCommerce product editor. To resolve any issues, please disable the beta editor. %2$sLearn how to disable the beta WooCommerce product editor.%3$s', 'wordpress-seo' ),
2✔
54
                                'Yoast SEO',
2✔
55
                                '<a href="' . \esc_url( $this->short_link_helper->get( 'https://yoa.st/learn-how-disable-beta-woocommerce-product-editor' ) ) . '" target="_blank">',
2✔
56
                                '</a>'
2✔
57
                        )
1✔
58
                );
1✔
59
        }
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc