); wc_admin_record_tracks_event( 'install_plugin_error', $properties ); /** * Action triggered when a plugin API cџџџџџџџџ`žо,у €lн,уuginaram WP_Error $api The API response. * * @since 6.4.0 */ do_action( 'woocommerce_plugins_install_api_error', $slug, $api ); $error_message = sprintf( /* translators: %s: plugin slug (example: woocommerce-services) */ џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ…,уџџџџK8$д ч€№šшџџџџj^RьЩ“xe™Hуrs->add( $plugin, $error_message ); $logger && $logger->add_error( $plugin, $error_message ); continue; } $upgrader = new Plugin_Upgrader( new Automatic_Upgrader_Skin() ); $џџџџџџџџ->in;  P_Erd= $r $plugin ] = round( ( microtime( true ) - $start_time ) * 1000 ); if ( is_wp_error( $result ) || is_null( $result ) ) { $properties = array( 'error_message' => /** * Since it's possible for third party code to clobber the `$wp_post_statuses` global, * we need to do a final check here to make sure the draft post status is * registered with the global so that it is not removed by WP_Query status * validation checks. */pi_download_link' => џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ˜…,уџџџџK8$д ч€№šшџџџџj^RьЩ“xe™HуHшџ.у џџџџњЊХјЎч€HЦ,уlt ) ? $result->get_error_message() : 'null', ); wc_admin_record_tracks_event( 'install_plugin_error', $properties ); /** * Action triggered wџџџџџџџџ…,уџџџџx…,уџџџџџџџџfсuЖT=Ч`}+уm object $api The plugin API object. * @param WP_Error|null $result The result of the plugin installation. * @param Plugin_Upgrader $upgrader The plugin upgrader. * * @since 6.4.0 */ do_action( 'џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџР^н,у џџџџNHБ$ ›wƒ0\Ъ,уш^н,у џџџџ‰PЯR€рЭ,у: %s: plugin slug (example: woocommerce-services) */ __( 'The requested plugin `%s` could not be installed. Upgrader install failed.', 'woocommerce' ), $slug ); $errors->add(џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ_н,у џџџџ‘gКšЕа€ тe.уnstall_error_message ); continue; } $installed_plugins[] = $plugin; $logger && $logger->installed( $plugin, $time[ $plugin ] ); } $data = array( 'installed' => $installed_plugins, 'results' => $reџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ л,уџџџџF ›|€рeЩ,ур*у џџџџ9…˜|€Z р*у џџџџœF\ŸГа€@Кf.ур*у џџџџ…Ÿ[ФiХtсал,ујр*у XНp†ЪЦчЩx…,у№р*у џџџџрАW Шnн,ушр*у 9ykєт…Ь …,урр*у џџџџЊQ^х~Якъ„,ує!s€P[?’2sАШmа\p”8sp\<мsP€\-sp\‰ЦsP]>ѕ§rPџџџџ^> л,у …,у …,уњ,уmmerce_onboarding_plugins_instalџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџymй•щ“9ррџ.у; self::install_plugins( $plugins, $logger ); self::activate_plugins( $plugins, $logger ); return true; } /** * Schedule plugin installation. * * @param array $plugins Plugins to install. * * @return strinџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ …,уџџџџ gins ) || ! is_array( $plugins ) ) { return new WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce' ), 404 ); } $job_id = uniqid(); WC()->queue()-џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ№…,уџџџџш'~WяБž}+уturn $job_id; } /** * Activate the requested plugins. * * @param array $plugins Plugins. * @param PluginsInstallLogger|null $logger Logger. * * @return WP_Error|array Plugin Status */ puџџџџџџџџ  actplugins, PluginsInstallLogger $logger = null ) { if ( empty( $plugins ) || ! is_array( $plugins ) ) { return new WP_Error( 'woocommerce_plugins_invalid_plugins', __( 'Plugins must be a non-empty array.', 'woocommerce' ), 404 ); } require_once ABSPATH . 'wџџџџџџџџ…,уgin.nн,уnts-plugin calls `WP_Filesystem()` during it's activation hook, which crashes without this include. require_once ABSPATH . 'wp-admin/includes/file.php'; /** * Filter the list of plugins to activate. * * @param array $plugins A list of theџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ…,уџџџџK8$д ч€№šшџџџџj^RьЩ“xe™Hуs ); $plugin_paths = self::get_installed_plugins_paths(); $errors = new WP_Error(); $activated_plugins = array(); foreach ( $plugins as $plugin ) { $slug = $pluginџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ0…,уџџџџ ) { /* translators: %s: plugin slug (example: woocommerce-services) */ $message = sprintf( __( 'The requested plugin `%s`. is not yet installed.', 'woocommerce' ), $slug ); $errors->add( $plugin, $messaџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџР…,уџџџџ-йZ~ўSEТ }+у = activate_plugin( $path ); if ( ! is_plugin_active( $path ) ) { /** * Action triggered when a plugin activation fails. * * @param string $slug The plugin slug. * @param null|WP_Error $result The џџџџџџџџ  act * @since 6.4.0 */ do_action( 'woocommerce_plugins_activate_error', $slug, $result ); /* translators: %s: plugin slug (example: woocommerce-services) */ $message = sprintf( __( 'The requested plugin `%s` could not be activated.', 'woocommerce' ), $slug ); џџџџџџџџ…,у $plА…,у $r->add_error( $plugin, $message ); continue; } $activated_plugins[] = $plugin; $logger && $logger->activated( $plugin ); } $data = array( 'activated' => $activated_plugins, 'active' => self::get_active_plugin_slugs(), џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџр‡+уџџџџK8$д ч€№šшџџџџj^RьЩ“xe™Hуo activate. * * @return string Job ID. */ public static function schedule_activate_plugins( $plugins ) { if ( empty( $plugins ) || ! is_array( $plugins ) ) { return new WP_Error( џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ8…,уџџџџ erce' ), 404 ); } $job_id = uniqid(); WC()->queue()->schedule_single( time() + 5, 'woocommerce_plugins_activate_callback', array( $plugins, $job_id ) ); return $job_id; } /** * Installation sџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ@…,уџџџџ€(уiг2ž`}+уnction get_installation_status( $job_id = null ) { $actions = WC()->queue()->search( array( 'hook' => 'woocommerce_plugins_install_callback', 'search' => $job_id, 'orderby' => 'date', 'order' => 'Dџџџџџџџџ eturon_data( $actions ); } /** * Gets the plugin data for the first action. * * @param array $actions Array of AS actions. * * @return array Array of action data. */ public static function get_action_data( $actions ) { $data = array(); foreach ( $actions as $actiџџџџџџџџ…,у А…,уr_DBs = $action->get_args(); $data[] = array( 'job_id' => $args[1], 'plugins' => $args[0], 'status' => $store->get_status( $action_id ), ); } return $data; } /** * Activation status. * * @param int $job_id Job ID. џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџЈ…,уџџџџK8$д ч€№šшџџџџj^RьЩ“xe™Hу()->queue()->search( array( 'hook' => 'woocommerce_plugins_activate_callback', 'search' => $job_id, 'orderby' => 'date', 'order' => 'DESC', ) ); return self::gџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџP…,уџџџџ ted store in the plugin list. * * @return void */ public static function maybe_show_connect_notice_in_plugin_list() { if ( 'woocommerce_page_wc-settings' !== get_current_screen()->id ) { return; } $notice_tyџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџр…,уџџџџ€(уiг2žщў,уturn; } $notice_string = ''; if ( 'long' === $notice_type ) { $notice_string .= __( 'Your store might be at risk as you are running old versions of WooCommerce plugins.', 'woocommerce' ); $notice_string .= ' ';џџџџџџџџ e_urg( array( 'page' => 'wc-admin', 'tab' => 'my-subscriptions', 'path' => rawurlencode( '/extensions' ), 'utm_source' => 'pu', 'utm_campaign' => 'pu_setting_screen_connect', ), admin_url( 'admin.php' ) ); $notice_string .=џџџџџџџџ…,уslatА…,у connect-notice-url" href="%s">Connect your store to WooCommerce.com to get updates and streamlined support for your subscriptions.', 'woocommerce' ), esc_url( $connect_page_url ) ); echo '

' . wp_ksџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ€…,уџџџџ xpiring subscription on WC settings page. * * @return void */ public static function maybe_show_expiring_subscriptions_notice() { if ( ! WC_Helper::is_site_connected() ) { return; } if ( 'woocommerce_page_wcџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ…,уџџџџ:—[Ып,уription_notice(); if ( isset( $notice['description'] ) ) { echo '

'; Pр„,у:’ŒН‡Dќ3woocommerce_blocks_payment_method_type_registrationn vo` Р№ #$P*+nice()  р„,уДˆ8­:о’/Automattic\WooCommerce\Blocks\Payments\in_array retu@с„,уTiœЯрzь/automattic\woocommerce\blocks\payments\in_arraycriptionс„,уMЦ…"‰ГТ1Automattic\WooCommerce\Blocks\Payments\filter_var* Conрс„,уэNdmв1œК1automattic\woocommerce\blocks\payments\filter_var * @p0т„,уљ3кШ Pч)Automattic\WooCommerce\Blocks\Payments\WCbs_to_show fil€т„,уй Š@ђ5Щ’)automattic\woocommerce\blocks\payments\wcubscription coат„,уљџ&ХСВТ1Automattic\WooCommerce\Blocks\Payments\array_keysrtice у„,у™—нq}j›К1automattic\woocommerce\blocks\payments\array_keystice dpу„,уѕg*V ЕЪЩ3Automattic\WooCommerce\Blocks\Payments\wp_script_isaticРу„,у•˜Эвm€о3automattic\woocommerce\blocks\payments\wp_script_isw, iф„,уЭ‡ЉE#_ЖТ1Automattic\WooCommerce\Blocks\Payments\wp_scriptserlink`ф„,уmˆлŸК1automattic\woocommerce\blocks\payments\wp_scriptsmpaignАф„,уїЙЉGJ№7Automattic\WooCommerce\Blocks\Payments\array_key_existsх„,уЅwФ/ЅЊoи7automattic\woocommerce\blocks\payments\array_key_existsPх„,уƒјtR4єњ6Automattic\WooCommerce\Blocks\Payments\property_exists) х„,у#хсЪТt“Г6automattic\woocommerce\blocks\payments\property_exists(№х„,у…СЇyЏ>.Automattic\WooCommerce\Blocks\Payments\sprintft_is$par@ц„,у%ТИIщŽ.automattic\woocommerce\blocks\payments\sprintfeset( $suц„,уЎd?†о’/Automattic\WooCommerce\Blocks\Payments\esc_htmlif $all_рц„,уNEЃЈКzь/automattic\woocommerce\blocks\payments\esc_htmlt = 1 < 0ч„,уŠЌ  – ю0Automattic\WooCommerce\Blocks\Payments\error_logct_id )€ч„,у*Ёoy вaю0automattic\woocommerce\blocks\payments\error_logssage_kач„,ужFћ&ХСВТ1Automattic\WooCommerce\Blocks\Payments\array_diffists ш„,уvЯйq}j›К1automattic\woocommerce\blocks\payments\array_diffroductиОP/уpг,у№г,у 9с.у v%.у(:я,уHШ/уРРў,уH­..уstring =Аžо,у(` ŽJИІ6Automattic\WooCommerce\StoreApi\Utilities\array_unique_щ„,уш(3пж 8М6automattic\woocommerce\storeapi\utilities\array_unique;ЊQ^х~Як(delete_draft_order_post_status_from_args> $product_id, pш„,уЊQ^х~Як(delete_draft_order_post_status_from_argsices\wc_orderъ„,уё1˜2‘7Automattic\WooCommerce\Blocks\Domain\Services\strtotimePъ„,уБіfbКЗ§7automattic\woocommerce\blocks\domain\services\strtotime ъ„,у”@Hd'ф0Automattic\WooCommerce\Blocks\Domain\Services\_x // 1. №ъ„,ун0ЗbŸй–ф0automattic\woocommerce\blocks\domain\services\_xh extra@ы„,уnhпєG›Н5Automattic\WooCommerce\Blocks\Domain\Services\_n_noop $ы„,у.§к—оље5automattic\woocommerce\blocks\domain\services\_n_noopipры„,уяmНБ‚ЂŒ3Automattic\WooCommerce\Blocks\Domain\Services\countay0ь„,уЏвg–`Ÿ+œ3automattic\woocommerce\blocks\domain\services\count єˆ+ЛкГž3default_option_woocommerce_pickup_location_settingsre}3Automattic\WooCommerce\StoreApi\Utilities\{closure}gs Рэ„,у-о€аE|П,Automattic\WooCommerce\StoreApi\Utilities\WCtionsrmattю„,уI#Žзж 8М6automattic\woocommerce\storeapi\utilities\array_reduced`ю„,у‰ZpŽJИІ6Automattic\WooCommerce\StoreApi\Utilities\array_reduceoя„,уK)~хЌсЇі4automattic\woocommerce\storeapi\utilities\get_optionce(жН5Uf6р/pre_option_woocommerce_pickup_location_settings return №`у*у‹щЧЁ)ќ4Automattic\WooCommerce\StoreApi\Utilities\get_optionay(€ь„,уtџнyн5‹/Automattic\WooCommerce\Blocks\Shipping\is_adminputilsPя„,урlџDjф/automattic\woocommerce\blocks\shipping\is_adminubscription_list_data();с6s Eе?s0Ptе?s `t”8sр<dsр№s№@+ѕ§rА‚>с6s „E”8s„<+sP„qѓrhUjp …Rs `(…p”8s0…<+s`0…Zs` P‡MŽAsPp ‡Nс6sр 8‰EP(spP‰BиCs‰d<sPА `A‰^s's``‰Й”8sp‰<dsp€‰4s€@€‰/с6s XŠEиCsŠd<sP `Š^Mѕrp Š]s's PŠЙе?sР `Št”8sАŠ<dsАРŠsР€Š4s€@Š+в!s §џџŒ*lsP аxŽRјsаpрŽQ,sрр №ŽR[s€№ŽZs€Р MŽAs  Nс6sp ЈEP(sPBе?s` `t”8s <ds 0s0Р+юs№ @‘[s @‘с6sР А’Eе?sа P“tс6sР И”EP(spP”B”8s`”<Es``”2с6sp Р•EP(sP•B”8sp•<Espp•2”8s€•<+sА€’с6sр Ш™EP(sАP™Bn9s™<с6sА аœEP(s PœBе?s  `œtn9sœ<с6sp иEP(s PBn9s<с6s@ рžEP(s PŸBс6s0 ш Eе?s@ P tP(sА` B”8sа <Esа` 2n9s  <ФsРА!ЃZsР`ЄMŽAsа@ЄNс6s`№ІEP(sаPІBиCsІd<sP0љІ^s's`ІЙ”8s І<ds 0І4s0@0І/с6s ЇEиCsЇd<sP@Ї^Mѕr@аPЇ]s'sPPЇЙе?s@`Їt”8s`Ї<ds`pЇsp0Ї4s0@Ї+в!s §џџЉ*с6sА`ЌEиCsЌd<sP Аh­^MѕrАаР­]йљrРpа­^s'sаP­Й#spрЎG +sр`Ўt”8s№Ў<`sPp€2ЌUeѕr€аЌTљr@,HЌ-s№Ў‰в!sрћџџЄ*0sЄв!s€іџџ*0sв!s ѓџџ‡*0sP‡ѕ§r џџџџД>Ру„,уф„,у(аЊ.у ѕЬ,уhU/уЪкj`ф„,уАф„,уиОP/уал,у@Жп,у@Жп,ух„,уPх„,у0FюhU/у х„,у№х„,урcщhU/у 9с.уhU/у 9с.уРу„,уф„,у(аЊ.уhU/у№л,у@ц„,уц„,урЏъ'}+урц„,у0ч„,у€—6/урц„,у0ч„,у€—6/у€ч„,уач„,у`bш}+у`}+уађ..уРПчР}+у }+уРfЧ.у€}+ур}+у0іЎ.у@ц„,уц„,урЏъ л,у -л,ух„,уPх„,у0FюhU/у х„,у№х„,урcщhU/у 9с.уhU/у 9с.у ш„,уpш„,у8юhU/у 9с.у€lн,у $button_link = add_query_arg( array( 'product_id' => $notice_data['product_id'], 'type' => 'expiring', ), $button_link ); } return array( 'description' => $allowed_link ? $notice_data['parsed_message'] : preg_replace( '#(.*?)#i', '\1', $notice_data['parsed_message'] ), 'button_text' => __( 'Renew', 'woocommerce' ), 'button_link' => $button_link, ); } /** * Determine whether a specific notice should be shown to the current user. * * @param string $dismiss_notice_meta User meta that includes the timestamp when a store notice was dismissed. * @return bool True if the notice should be shown, false otherwise. */ public static function should_show_notice( $dismiss_notice_meta ) { // Get the current user ID. $user_id = get_current_user_id(); // Get the timestamp when the notice was dismissed. $dismissed_timestamp = get_user_meta( $user_id, $dismiss_notice_meta, true ); // If the notice was dismissed within the last month, do not show it. if ( ! empty( $dismissed_timestamp ) && ( time() - $dismissed_timestamp ) < 30 * DAY_IN_SECONDS ) { return false; } // If the notice was dismissed more than a month ago, delete the meta value and show the notice. if ( ! empty( $dismissed_timestamp ) ) { delete_user_meta( $user_id, $dismiss_notice_meta ); } return true; } /** * Get the notice data for missing payment method. * * @param bool $allowed_link whether should show link on the notice or not. * @param int $total_expiring_subscriptions total expiring subscriptions. * * @return array the notices data. */ public static function get_missing_payment_method_notice( $allowed_link = true, $total_expiring_subscriptions = 1 ) { $add_payment_method_link = add_query_arg( array( 'utm_source' => 'pu', 'utm_campaign' => $allowed_link ? 'pu_settings_screen_add_payment_method' : 'pu_in_apps_screen_add_payment_method', ), self::WOO_ADD_PAYMENT https://macleodgroup.ca/wp-sitemap-posts-page-1.xmlhttps://macleodgroup.ca/wp-sitemap-posts-property-1.xmlhttps://macleodgroup.ca/wp-sitemap-users-1.xml