CustomizeStoreWithBlocks.php
2 years ago
CustomizingProductCatalog.php
1 year ago
EUVATNumber.php
2 years ago
EditProductsOnTheMove.php
2 years ago
EmailImprovements.php
1 year ago
FirstProduct.php
1 year ago
GivingFeedbackNotes.php
3 years ago
InstallJPAndWCSPlugins.php
4 weeks ago
LaunchChecklist.php
2 years ago
MagentoMigration.php
2 years ago
ManageOrdersOnTheGo.php
2 years ago
MarketingJetpack.php
4 weeks ago
MigrateFromShopify.php
2 years ago
MobileApp.php
2 years ago
NewSalesRecord.php
3 years ago
NoteActionForbiddenException.php
4 weeks ago
OnboardingPayments.php
2 years ago
OnlineClothingStore.php
2 years ago
OrderMilestones.php
2 years ago
PaymentsMoreInfoNeeded.php
5 months ago
PaymentsRemindMeLater.php
5 months ago
PerformanceOnMobile.php
2 years ago
PersonalizeStore.php
3 years ago
RealTimeOrderAlerts.php
2 years ago
ScheduledUpdatesPromotion.php
5 months ago
SellingOnlineCourses.php
2 years ago
TrackingOptIn.php
1 year ago
UnsecuredReportFiles.php
2 years ago
WooCommercePayments.php
2 years ago
WooCommerceSubscriptions.php
2 years ago
WooSubscriptionsNotes.php
1 year ago
GivingFeedbackNotes.php
56 lines
| 1 | <?php |
| 2 | /** |
| 3 | * WooCommerce Admin (Dashboard) Giving feedback notes provider |
| 4 | * |
| 5 | * Adds notes to the merchant's inbox about giving feedback. |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\WooCommerce\Internal\Admin\Notes; |
| 9 | |
| 10 | defined( 'ABSPATH' ) || exit; |
| 11 | |
| 12 | use Automattic\WooCommerce\Admin\Notes\Note; |
| 13 | use Automattic\WooCommerce\Admin\Notes\NoteTraits; |
| 14 | use Automattic\WooCommerce\Internal\Admin\Survey; |
| 15 | |
| 16 | /** |
| 17 | * Giving_Feedback_Notes |
| 18 | */ |
| 19 | class GivingFeedbackNotes { |
| 20 | /** |
| 21 | * Note traits. |
| 22 | */ |
| 23 | use NoteTraits; |
| 24 | |
| 25 | /** |
| 26 | * Name of the note for use in the database. |
| 27 | */ |
| 28 | const NOTE_NAME = 'wc-admin-store-notice-giving-feedback-2'; |
| 29 | |
| 30 | /** |
| 31 | * Get the note. |
| 32 | * |
| 33 | * @return Note |
| 34 | */ |
| 35 | public static function get_note() { |
| 36 | if ( ! self::is_wc_admin_active_in_date_range( 'week-1-4' ) ) { |
| 37 | return; |
| 38 | } |
| 39 | |
| 40 | // Otherwise, create our new note. |
| 41 | $note = new Note(); |
| 42 | $note->set_title( __( 'You\'re invited to share your experience', 'woocommerce' ) ); |
| 43 | $note->set_content( __( 'Now that you’ve chosen us as a partner, our goal is to make sure we\'re providing the right tools to meet your needs. We\'re looking forward to having your feedback on the store setup experience so we can improve it in the future.', 'woocommerce' ) ); |
| 44 | $note->set_content_data( (object) array() ); |
| 45 | $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); |
| 46 | $note->set_name( self::NOTE_NAME ); |
| 47 | $note->set_source( 'woocommerce-admin' ); |
| 48 | $note->add_action( |
| 49 | 'share-feedback', |
| 50 | __( 'Share feedback', 'woocommerce' ), |
| 51 | Survey::get_url( '/store-setup-survey' ) |
| 52 | ); |
| 53 | return $note; |
| 54 | } |
| 55 | } |
| 56 |