PATH:
home
/
lab2454c
/
sothebankuab.com
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-admin
/
src
/
Notes
<?php /** * Add a note to the merchant's inbox prompting them to set up additional * payment types if they have WooCommerce Payments activated. * * @package WooCommerce\Admin */ namespace Automattic\WooCommerce\Admin\Notes; defined( 'ABSPATH' ) || exit; /** * Set_Up_Additional_Payment_Types */ class SetUpAdditionalPaymentTypes { /** * Note traits. */ use NoteTraits; /** * Name of the note for use in the database. */ const NOTE_NAME = 'wc-admin-set-up-additional-payment-types'; /** * Constructor. */ public function __construct() { add_action( 'activate_woocommerce-payments/woocommerce-payments.php', array( $this, 'on_activate_wcpay', ) ); add_action( 'deactivate_woocommerce-payments/woocommerce-payments.php', array( $this, 'on_deactivate_wcpay', ) ); } /** * Executes when the WooCommerce Payments plugin is activated. It does nothing * if WooCommerce Payments plugin is not included in onboarding business extensions, * otherwise it possibly adds the note if it isn't already in the database and if * it matches any criteria (see get_note()). */ public static function on_activate_wcpay() { $onboarding_profile = get_option( 'woocommerce_onboarding_profile', array() ); if ( is_array( $onboarding_profile ) && array_key_exists( 'business_extensions', $onboarding_profile ) ) { if ( ! is_array( $onboarding_profile['business_extensions'] ) || ! in_array( 'woocommerce-payments', $onboarding_profile['business_extensions'], true ) ) { return; } } self::possibly_add_note(); } /** * Executes when the WooCommerce Payments plugin is deactivated. Possibly * hard-deletes the note if it is in the database. Hard-delete is used * instead of soft-delete or actioning the note because we need to * show the note if the plugin is activated again. */ public static function on_deactivate_wcpay() { self::possibly_delete_note(); } /** * Get the note. * * @return Note */ public static function get_note() { $content = __( 'Set up additional payment providers, using third-party services or other methods.', 'woocommerce' ); $note = new Note(); $note->set_title( __( 'Set up additional payment providers', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'set-up-payments', __( 'Set up payments', 'woocommerce' ), wc_admin_url( '&task=payments' ), Note::E_WC_ADMIN_NOTE_UNACTIONED, true ); return $note; } }
[-] LearnMoreAboutVariableProducts.php
[edit]
[-] GivingFeedbackNotes.php
[edit]
[-] WooCommerceSubscriptions.php
[edit]
[-] DeprecatedNotes.php
[edit]
[-] SellingOnlineCourses.php
[edit]
[-] FirstProduct.php
[edit]
[+]
MerchantEmailNotifications
[-] ChoosingTheme.php
[edit]
[-] ManageOrdersOnTheGo.php
[edit]
[-] Marketing.php
[edit]
[-] ManageStoreActivityFromHomeScreen.php
[edit]
[+]
..
[-] MobileApp.php
[edit]
[-] CustomizingProductCatalog.php
[edit]
[-] NavigationNudge.php
[edit]
[-] CouponPageMoved.php
[edit]
[-] ConfirmTaxSettings.php
[edit]
[-] NavigationFeedbackFollowUp.php
[edit]
[-] AddFirstProduct.php
[edit]
[-] InsightFirstSale.php
[edit]
[-] OrderMilestones.php
[edit]
[-] Notes.php
[edit]
[-] NavigationFeedback.php
[edit]
[-] TrackingOptIn.php
[edit]
[-] DrawAttention.php
[edit]
[-] OnboardingPayments.php
[edit]
[-] WooCommercePayments.php
[edit]
[-] PersonalizeStore.php
[edit]
[-] TestCheckout.php
[edit]
[-] NotesUnavailableException.php
[edit]
[-] Note.php
[edit]
[-] FilterByProductVariationsInReports.php
[edit]
[-] GettingStartedInEcommerceWebinar.php
[edit]
[-] SetUpAdditionalPaymentTypes.php
[edit]
[-] LaunchChecklist.php
[edit]
[-] MarketingJetpack.php
[edit]
[-] StartDropshippingBusiness.php
[edit]
[-] WooSubscriptionsNotes.php
[edit]
[-] ChooseNiche.php
[edit]
[-] RealTimeOrderAlerts.php
[edit]
[-] OnboardingEmailMarketing.php
[edit]
[-] DataStore.php
[edit]
[-] NewSalesRecord.php
[edit]
[-] AddingAndManangingProducts.php
[edit]
[-] InstallJPAndWCSPlugins.php
[edit]
[-] InsightFirstProductAndPayment.php
[edit]
[-] EditProductsOnTheMove.php
[edit]
[-] DeactivatePlugin.php
[edit]
[-] FirstDownlaodableProduct.php
[edit]
[-] EUVATNumber.php
[edit]
[-] OnlineClothingStore.php
[edit]
[-] MigrateFromShopify.php
[edit]
[-] CustomizeStoreWithBlocks.php
[edit]
[-] PerformanceOnMobile.php
[edit]
[-] WelcomeToWooCommerceForStoreUsers.php
[edit]
[-] OnboardingTraits.php
[edit]
[-] NoteTraits.php
[edit]
[-] NeedSomeInspiration.php
[edit]