WooSubscriptionsNotes
Woo_Subscriptions_Notes
Description Description
Source Source
File: packages/woocommerce-admin/src/Notes/WooSubscriptionsNotes.php
Methods Methods
- __construct — Hook all the things.
- add_no_connection_note — Adds a note prompting to connect to WooCommerce.com.
- add_or_update_subscription_expired — Adds a note for an expired subscription, or updates an expiring note to expired.
- add_or_update_subscription_expiring — Adds or updates a note for an expiring subscription.
- admin_init — Things to do on admin_init.
- check_connection — Checks the connection. Adds a note (as necessary) if there is no connection.
- delete_any_note_for_product_id — Deletes a note for a given product ID, if the note exists at all.
- find_note_for_product_id — Finds a note for a given product ID, if the note exists at all.
- get_bump_thresholds — We want to bubble up expiration notices when they cross certain age thresholds. PHP 5.2 doesn't support constant arrays, so we do this.
- get_connected_site_id — Returns the WooCommerce.com provided site ID for this site.
- get_product_id_from_subscription_note — Gets the product_id (if any) associated with a note.
- get_subscription_active_product_ids — Returns an array of product_ids whose subscriptions are active on this site.
- is_connected — Whether or not we think the site is currently connected to WooCommerce.com.
- prune_inactive_subscription_notes — Removes notes for product_ids no longer active on this site.
- refresh_subscription_notes — For each active subscription on this site, checks the expiration date and creates/updates/deletes notes.
- remove_notes — Clears all connection or subscription notes.
- update_option_woocommerce_helper_data — Reacts to changes in the helper option.