Code Duplication    Length = 14-19 lines in 2 locations

includes/admin/class-wc-stripe-inbox-notes.php 2 locations

@@ 91-109 (lines=19) @@
88
	/**
89
	 * If conditions are right, show note promoting Apple Pay marketing guide.
90
	 */
91
	public static function create_marketing_note() {
92
		// Make sure conditions for this note still hold.
93
		if ( ! self::should_show_marketing_note() ) {
94
			return;
95
		}
96
97
		$note = new WC_Admin_Note();
98
		$note->set_title( __( 'Boost sales this holiday season with Apple Pay!', 'woocommerce-gateway-stripe' ) );
99
		$note->set_content( __( 'Now that you accept Apple Pay® with Stripe, you can increase conversion rates by letting your customers know that Apple Pay is available. Here’s a marketing guide to help you get started.', 'woocommerce-gateway-stripe' ) );
100
		$note->set_type( WC_Admin_Note::E_WC_ADMIN_NOTE_MARKETING );
101
		$note->set_name( self::SUCCESS_NOTE_NAME );
102
		$note->set_source( 'woocommerce-gateway-stripe' );
103
		$note->add_action(
104
			'marketing-guide',
105
			__( 'See marketing guide', 'woocommerce-gateway-stripe' ),
106
			'https://developer.apple.com/apple-pay/marketing/'
107
		);
108
		$note->save();
109
	}
110
111
	/**
112
	 * Show note indicating domain verification failure.
@@ 114-127 (lines=14) @@
111
	/**
112
	 * Show note indicating domain verification failure.
113
	 */
114
	public static function create_failure_note() {
115
		$note = new WC_Admin_Note();
116
		$note->set_title( __( 'Apple Pay domain verification needed', 'woocommerce-gateway-stripe' ) );
117
		$note->set_content( __( 'The WooCommerce Stripe Gateway extension attempted to perform domain verification on behalf of your store, but was unable to do so. This must be resolved before Apple Pay can be offered to your customers.', 'woocommerce-gateway-stripe' ) );
118
		$note->set_type( WC_Admin_Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
119
		$note->set_name( self::FAILURE_NOTE_NAME );
120
		$note->set_source( 'woocommerce-gateway-stripe' );
121
		$note->add_action(
122
			'learn-more',
123
			__( 'Learn more', 'woocommerce-gateway-stripe' ),
124
			'https://docs.woocommerce.com/document/stripe/#apple-pay'
125
		);
126
		$note->save();
127
	}
128
}
129
130
new WC_Stripe_Inbox_Notes();