diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh new file mode 100755 index 0000000..ad26312 --- /dev/null +++ b/bin/install-wp-tests.sh @@ -0,0 +1,205 @@ +#!/usr/bin/env bash + +if [ $# -lt 3 ] && [ -z $WCPAY_DIR ]; then + echo "usage: $0 [db-host] [wp-version] [wc-version] [skip-database-creation]" + exit 1 +fi + +DB_NAME=${1-wcpay_tests} +DB_USER=${2-root} +DB_PASS=${3-$MYSQL_ROOT_PASSWORD} +DB_HOST=${4-$WORDPRESS_DB_HOST} +WP_VERSION=${5-latest} +WC_VERSION=${6-latest} +SKIP_DB_CREATE=${7-false} + +TMPDIR=${TMPDIR-/tmp} +TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//") +WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib} +WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/} + +download() { + if [ `which curl` ]; then + curl -s "$1" > "$2"; + elif [ `which wget` ]; then + wget -nv -O "$2" "$1" + fi +} + +wp() { + WORKING_DIR="$PWD" + cd "$WP_CORE_DIR" + + if [ ! -f $TMPDIR/wp-cli.phar ]; then + download https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar "$TMPDIR/wp-cli.phar" + fi + php "$TMPDIR/wp-cli.phar" $@ + + cd "$WORKING_DIR" +} + +get_db_connection_flags() { + # parse DB_HOST for port or socket references + local DB_HOST_PARTS=(${DB_HOST//\:/ }) + local DB_HOSTNAME=${DB_HOST_PARTS[0]}; + local DB_SOCK_OR_PORT=${DB_HOST_PARTS[1]}; + local EXTRA_FLAGS="" + + if ! [ -z $DB_HOSTNAME ] ; then + if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then + EXTRA_FLAGS=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp" + elif ! [ -z $DB_SOCK_OR_PORT ] ; then + EXTRA_FLAGS=" --socket=$DB_SOCK_OR_PORT" + elif ! [ -z $DB_HOSTNAME ] ; then + EXTRA_FLAGS=" --host=$DB_HOSTNAME --protocol=tcp" + fi + fi + echo "--user=$DB_USER --password=$DB_PASS $EXTRA_FLAGS"; +} + +wait_db() { + local MYSQLADMIN_FLAGS=$(get_db_connection_flags) + local WAITS=0 + + set +e + mysqladmin status $MYSQLADMIN_FLAGS > /dev/null + while [[ $? -ne 0 ]]; do + ((WAITS++)) + if [ $WAITS -ge 6 ]; then + echo "Maximum database wait time exceeded" + exit 1 + fi; + echo "Waiting until the database is available..." + sleep 5s + mysqladmin status $MYSQLADMIN_FLAGS > /dev/null + done + set -e +} + +if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+\-(beta|RC)[0-9]+$ ]]; then + WP_BRANCH=${WP_VERSION%\-*} + WP_TESTS_TAG="branches/$WP_BRANCH" + +elif [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then + WP_TESTS_TAG="branches/$WP_VERSION" +elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then + if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then + # version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x + WP_TESTS_TAG="tags/${WP_VERSION%??}" + else + WP_TESTS_TAG="tags/$WP_VERSION" + fi +elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then + WP_TESTS_TAG="trunk" +else + # http serves a single offer, whereas https serves multiple. we only want one + download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json + grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json + LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//') + if [[ -z "$LATEST_VERSION" ]]; then + echo "Latest WordPress version could not be found" + exit 1 + fi + WP_TESTS_TAG="tags/$LATEST_VERSION" +fi +set -e + +install_wp() { + if [ -d $WP_CORE_DIR ]; then + return; + fi + + mkdir -p $WP_CORE_DIR + + wp core download --version=$WP_VERSION + + download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php +} + +configure_wp() { + WP_SITE_URL="http://local.wordpress.test" + wait_db + + if [[ ! -f "$WP_CORE_DIR/wp-config.php" ]]; then + wp core config --dbname=$DB_NAME --dbuser=$DB_USER --dbpass=$DB_PASS --dbhost=$DB_HOST --dbprefix=wptests_ + fi + wp core install --url="$WP_SITE_URL" --title="Example" --admin_user=admin --admin_password=password --admin_email=info@example.com --skip-email +} + +install_test_suite() { + # portable in-place argument for both GNU sed and Mac OSX sed + if [[ $(uname -s) == 'Darwin' ]]; then + local ioption='-i.bak' + else + local ioption='-i' + fi + + # set up testing suite if it doesn't yet exist + if [ ! -d $WP_TESTS_DIR ]; then + # set up testing suite + mkdir -p $WP_TESTS_DIR + svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes + svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data + fi + + if [ ! -f wp-tests-config.php ]; then + download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php + # remove all forward slashes in the end + WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::") + sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php + sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php + sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php + sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php + sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php + sed $ioption "s/example.org/woocommerce.com/" "$WP_TESTS_DIR"/wp-tests-config.php + sed $ioption "s/admin@example.org/tests@woocommerce.com/" "$WP_TESTS_DIR"/wp-tests-config.php + fi +} + +install_db() { + if [ ${SKIP_DB_CREATE} = "true" ]; then + return 0 + fi + + wait_db + local MYSQLADMIN_FLAGS=$(get_db_connection_flags) + + # drop database if exists + set +e + mysqladmin drop --force $DB_NAME $MYSQLADMIN_FLAGS &> /dev/null + set -e + + # create database + mysqladmin create $DB_NAME $MYSQLADMIN_FLAGS +} + +install_woocommerce() { + WC_INSTALL_EXTRA='' + INSTALLED_WC_VERSION=$(wp plugin get woocommerce --field=version) + + if [[ $WC_VERSION == 'beta' ]]; then + # Get the latest non-trunk version number from the .org repo. This will usually be the latest release, beta, or rc. + WC_VERSION=$(curl https://api.wordpress.org/plugins/info/1.0/woocommerce.json | jq -r '.versions | with_entries(select(.key|match("beta";"i"))) | keys[-1]' --sort-keys) + fi + + if [[ -n $INSTALLED_WC_VERSION ]] && [[ $WC_VERSION == 'latest' ]]; then + # WooCommerce is already installed, we just must update it to the latest stable version + wp plugin update woocommerce + wp plugin activate woocommerce + else + if [[ $INSTALLED_WC_VERSION != $WC_VERSION ]]; then + # WooCommerce is installed but it's the wrong version, overwrite the installed version + WC_INSTALL_EXTRA+=" --force" + fi + if [[ $WC_VERSION != 'latest' ]] && [[ $WC_VERSION != 'beta' ]]; then + WC_INSTALL_EXTRA+=" --version=$WC_VERSION" + fi + wp plugin install woocommerce --activate$WC_INSTALL_EXTRA + fi +} + +install_wp +install_db +configure_wp +install_test_suite +install_woocommerce diff --git a/changelog.txt b/changelog.txt index 6f271cb..3c4c2e0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,150 @@ *** WooCommerce Subscriptions Changelog *** + +2023-07-05 - version 5.2.0 +* Fix: Resolved an issue that prevented the selected Shipping Method from being saved when switching an assembled Product Bundle. +* Fix: When HPOS is enabled, permanently deleting a subscription related order wasn't updating the related orders cache properly. +* Fix: Added logic to check if the recurring cart array is present before displaying the recurring totals section in the cart. +* Dev: Updated subscriptions-core to 5.8.0 + +2023-06-05 - version 5.1.3 +* Fix: Resolved an issue with customers being redirected to an incorrect Pay for Order URL after login. +* Dev: Updated subscriptions-core to 5.7.2 + +2023-05-11 - version 5.1.2 +* Fix: Resolve errors for third-party code using the URLs returned from WC_Subscriptions_Admin::add_subscription_url() and WCS_Cart_Renewal::get_checkout_payment_url() because they were erroneously escaped. #4526 +* Dev: Enable third-party code to alter the delete payment token URL returned from flag_subscription_payment_token_deletions. #4526 +* Dev: Update subscriptions-core to 5.7.1. #4526 + +2023-05-05 - version 5.1.1 +* Fix: Error when third-party extensions use the `woocommerce_subscriptions_add_switch_query_args` filter. #4522 + +2023-05-04 - version 5.1.0 +* Fix: Correctly determine subscription free shipping eligibility when the initial payment cart isn't eligible. Fixes erroneous "Invalid recurring shipping method" errors on checkout. #4513 +* Fix: Fatal error from third-party extensions using the `woocommerce_update_order` expecting the second parameter. #4519 +* Dev: Fixed precision loss notice that occurs when running PHP 8.1. #4513 +* Dev: Fix phpcs and semgrep warnings to improve code quality. #4513 #4514 +* Dev: Use `wp_safe_redirect()` when processing a payment method change request. #4513 +* Dev: Update subscriptions-core to 5.7.0. #4519 +* Dev: Pass the subscription object as the second parameter to `woocommerce_update_subscription` hook (and `woocommerce_update_order` for backwards compatibility). #4519 +* Dev: Return a response from the WC_Subscription::set_status() function in line with the parent WC_Order::set_status() function. #4519 +* Dev: Add the 'wcs_recurring_shipping_package_rates_match_standard_rates' filter to enable third-parties to override whether the subscription packages match during checkout validation. #4519 + +2023-03-31 - version 5.0.1 +* Fix: WooCommerce dependency check was erroneously failing on stores with other plugins including a woocommerce.php file. #4497 + +2023-03-10 - version 5.0.0 +* Fix: When a customer changes their address during a subscription switch, don't save their new address in the postmeta table when HPOS is enabled. #4489 +* Fix: When HPOS is enabled, changing your address while paying for a renewal order will update the address on the subscription. #4491 +* Fix: Prevent admin error notices being shown for the "subscription trial end" event that was caused by no callbacks being attached to this scheduled action. #4491 +* Fix: Prevent fatal error when copying the `_shipping_address` meta data where the value is not an array. #4495 +* Update: Use the WC installed version to determine if Subscription dependencies are met rather than the database version. +* Dev: Update subscriptions-core to 5.5.0. #4491 + +2023-02-22 - version 4.9.1 +* Fix: Revert minimum required version of WooCommerce to 6.5 due to fatal errors on some sites. + +2023-02-22 - version 4.9.0 +* Add: Declare WooCommerce Subscriptions compatible with High-Performance Order Storage. +* Dev: Update subscriptions-core to 5.4.0. +* Dev: Remove the recurring shipping method cache that caused bugs for third-party plugins like Conditional Shipping and Payments. +* Dev: Bump minimum required version of WooCommerce to 7.0. + +2023-02-01 - version 4.8.1 +* Fix: Fatal error when loading the Edit Subscription page with custom admin billing or shipping fields. +* Dev: Update subscriptions-core to 5.3.1. + +2023-01-30 - version 4.8.0 +* Add: Highlight subscriptions with overdue payment in list view with red icon & tooltip. +* Add: New wcs_set_order_address() helper function to set an array of address fields on an order or subscription. +* Update: Admin subscription reports are disabled on stores that have opted into HPOS without data syncing enabled. +* Fix: Shipping address correctly set when resubscribing or switching subscriptions that contain different billing and shipping addresses. +* Fix: When processing customer requests to update all their subscription payment methods, ensure the updated subscription is used to fetch the new payment meta, not and old instance. +* Fix: Catch exceptions when changing payment method associated with a subscription to avoid fatal errors. +* Fix: Show the payment retries metabox for renewal orders that have retry attempts on stores that have HPOS enabled. +* Fix: Scheduled retry actions are now cancelled when trashing/deleting a renewal order on stores that have HPOS enabled. +* Fix: On HPOS stores, return the correct count per subscription status from the `/system_status` WC API endpoint. +* Fix: Refactor `WC_Subscriptions_Switcher::process_checkout()` to support stores with HPOS enabled. +* Fix: Refactor `WC_REST_Subscriptions_V1_Controller::get_subscription_orders()` to support stores with HPOS enabled. +* Fix: Edit, add, and list Subscription admin pages now work when HPOS is enabled. +* Fix: Fixed issues where multiple subscription purchases wouldn't appear on the My Account > Subscriptions screen, on HPOS environments. +* Fix: Refactor `WCS_Meta_Box_Subscription_Data::save` to support HPOS stores, fixing a PHP warning notice when updating an order via the Edit Order screen. +* Fix: Set the `download_permissions_granted` value when purchasing a downloadable subscription product when HPOS is enabled. +* Fix: When a customer changes their address on their account or subscription, make sure the new address is saved when HPOS is enabled. +* Fix: Removed the potential for an infinite loop when getting a subscription's related orders while the subscription is being loaded. +* Fix: Refactor `WC_Subscriptions_Renewal_Order` and `WC_Subscriptions_Tracker` classes to support HPOS stores. +* Fix: "Subscriptions by Payment Gateway" in WooCommerce → Status now shows the correct values when HPOS is enabled. +* Fix: Check whether the order actually exists before accessing order properties in wcs_order_contains_subscription(). +* Fix: When a subscription's parent order is trashed or deleted, make sure the related subscription is also trashed or deleted on stores with HPOS enabled. +* Fix: When a subscription is trashed or deleted, make sure it is cancelled first on stores with HPOS enabled. +* Fix: Merge any custom meta_query args passed to wcs_get_orders_with_meta_query() to avoid overriding WC core args that map onto meta_query. +* Fix: Prevent erroneously resyncing a subscription every time it is loaded from the database on HPOS environments. +* Fix: On HPOS environments, ensure subscription related order caches are updated when relationship order meta (eg `_subscription_renewal` or `_subscription_switch`) is updated. +* Fix: On HPOS environments, update related orders cache when subscription is trashed, deleted, or restored / untrashed. +* Fix: Replace code using wp_count_posts(), get_post_type(), get_posts and wp_delete_post() with equivalent WC Data Store functions to support stores that have HPOS enabled. +* Dev: Add subscriptions-core library version to the WooCommerce system status report. +* Dev: Introduced a WCS_Object_Data_Cache_Manager and WCS_Object_Data_Cache_Manager_Many_To_One class as HPOS equivalents of the WCS_Post_Meta_Cache_Manager classes. +* Dev: Introduced a new `untrash_order()` in the `WCS_Orders_Table_Subscription_Data_Store` class to fix untrashing subscriptions on stores that have HPOS enabled. +* Dev: Moved the trash, untrash & delete related `add_actions()` in the `WC_Subscriptions_Manager` class to be added on the `woocommerce_loaded` action. +* Dev: Fix phpcs violations in the `WC_Subscriptions_Tracker` and `WCS_Admin_System_Status` classes to improve code quality. +* Dev: Deprecate the `WC_Subscriptions_Switcher::update_shipping_methods()` function. +* Dev: Fix phpcs violations in the `WC_REST_Subscription_System_Status_Manager` class to improve code quality. +* Dev: Remove deprecated `strptime` function in favour of `DateTime::createFromFormat`. +* Dev: Update subscriptions-core to 5.3.0. +* Dev: Bump minimum required version of WooCommerce to 6.5. + +2022-12-06 - version 4.7.0 +* Add: New wcs_get_orders_with_meta_query() helper function to query for orders and subscriptions. +* Add: New WCS_Orders_Table_Subscription_Data_Store class to support subscriptions stored in High-Performance Order Storage (HPOS). +* Add: New WCS_Orders_Table_Data_Store_Controller class to load the proper subscriptions data store when the store has HPOS enabled. +* Add: New data copier class to copy data to subscriptions and related orders in place of direct database queries in prepraration for HPOS support. +* Fix: Set payment tokens when copying data between orders and subscriptions in a CRUD compatible way. Fixes PHP notices during renewal order process. +* Fix: Infinite loop that can occur with `WCS_Orders_Table_Subscription_Data_Store::read_multiple()` on HPOS-enabled stores. +* Fix: On HPOS stores, when querying for subscriptions with wcs_get_orders_with_meta_query() with status 'any', ensure that wc_get_orders() queries for subscription statuses. +* Fix: On HPOS stores, when saving a subscription make sure subscription properties (ie `_requires_manual_renewal`) are saved to the database. +* Fix: On HPOS stores, when a subscription is loaded from the database, make sure all core subscription properties are read directly from meta. +* Fix: When viewing My Account > Subscriptions, fix an issue where no subscriptions were listed when HPOS is enabled. +* Fix: On HPOS stores, ensure payment tokens are copied from the subscription to the renewal order. +* Fix: Refactor `WCS_Meta_Box_Schedule::save` to support HPOS stores, fixing a PHP warning notice when updating an order via the Edit Order screen. +* Fix: Return a fresh instance of the renewal order after creating it. Fixes caching issues on HPOS sites where the returned order has no line items. +* Fix: Processing a manual renewal order with HPOS and data syncing enabled correctly saves the related order cache metadata on the subscription and prevents the post and order meta data getting out of sync. +* Fix: Use supported CRUD apis to determine if subscriptions are present on store (`wcs_do_subscriptions_exist`) +* Fix: With HPOS and data syncing enabled, updating the status of a pending manual renewal order to a paid status correctly activates the related subscription. +* Fix: Switch orders not appearing in related orders table on edit subscription screen when HPOS is active. +* Fix: On HPOS stores, make sure the links in the related-orders table redirect to the new Edit Order URL. +* Fix: When saving sync meta data on a new subscription, use 'woocommerce_new_subscription' instead of 'save_post'. This is to prevent errors when purchasing a subscription on stores that have HPOS enabled. +* Fix: When WooCommerce is network activated on multisites, don't show the "WooCommerce Subscriptions is inactive". +* Update: Improve maybe_add_subscription_meta() and subscription_contains_synced_product() inside our WC_Subscriptions_Synchroniser class to use CRUD methods. +* Update: Refactor the `wcs_is_subscription` helper function to support HPOS. +* Update: Refactor our Related Orders data store classes (WCS_Related_Order_Store_Cached_CPT and WCS_Related_Order_Store_CPT) to use CRUD methods to support subscriptions and orders stored in HPOS. +* Update: Display related orders table when viewing the new "Edit Order" page (HPOS enabled stores). +* Update: Replace instances of `get_posts()` across codebase with new wcs_get_orders_with_meta_query() function. +* Update: The subscription creation function `wcs_create_subscription` has been updated to use WooCommerce CRUD methods in preparation for supporting High Performance Order Storage (HPOS). +* Update: Improve wcs_copy_order_address() to use modern APIs for setting address fields. +* Dev: Removed the deprecated "wcs_subscriptions_for_{$relation_type}_order" dynamic hook used to filter the list of related subscriptions for the given relation type. The following hooks have been removed with no alternative: + wcs_subscriptions_for_renewal_order + wcs_subscriptions_for_switch_order + wcs_subscriptions_for_resubscribe_order +* Dev: Introduce a WC_Subscription::set_status() function to handle subscriptions set with a draft or auto-draft status. Replaces the need for the overriding WC_Subscription::get_status() which has been deleted. +* Dev: Manual renewal orders created with HPOS and data syncing enabled are properly linked to the subscription by its `_subscription_renewal` meta and backfilled to posts table. +* Dev: Update subscriptions-core to 5.1.0 +* Dev: Replace use of deprecated hook `wcs_renewal_order_meta_query` with `wc_subscriptions_renewal_order_data` in `WC_Subscriptions_Switcher`. +* Dev: Usage of \WC_Subscriptions_Core_Plugin::get_plugin_version() is no longer recommended for version detection. \WC_Subscriptions_Core_Plugin::get_library_version() should be used instead. +* Dev: Code that was tagged with a version and moved from WooCommerce Subscriptions now explicitly mentions this and shows the correct subscriptions-core and WC Subscriptions versions. +* Dev: Refactor the saving of subscription dates in the subscription datastore to separate fetching changes and saving. Enables backfilling subscription dates when HPOS syncing is enabled. +* Dev: Replace the use of the deprecated wcs_renewal_order_meta hook with wc_subscription_renewal_order_data in the WCS_Related_Order_Store_Cached_CPT class. +* Dev: wcs_get_objects_property and wcs_set_objects_property have been marked as deprecated. Getters/Setters should be used on the objects instead. +* Dev: Deprecated the "wcs_{type}_meta_query" dynamic hook used to alter the database query used to fetch the meta data to copy between subscriptions and renewal orders. There is no direct replacement. Third-parties should use the "wc_subscriptions_{type}_data" or "wc_subscriptions_object_data" hooks instead. +* Dev: Deprecated the "wcs_{type}_meta" dynamic hook used to filter data copied to subscriptions and renewal orders. Third-parties should use wc_subscriptions_{type}_data instead. + wcs_subscription_meta -> wc_subscriptions_subscription_data + wcs_parent_meta -> wc_subscriptions_parent_data + wcs_resubscribe_order_meta -> wc_subscriptions_resubscribe_order_data + wcs_renewal_order_meta -> wc_subscriptions_renewal_order_data +* Dev: woocommerce_new_subscription_data hook will only work with CPT datastore and so has been deprecated. +* Dev: i18n usage of strftime has been deprecated for subscription titles. Date is now formatted using woocommerce standard date formatting. +* Dev: Removes the legacy `woo-includes/` directory. +* Dev: Updated internal version references to the version of subscriptions-core. +* Dev: Bump minimum required version of WooCommerce to 6.0. + 2022-10-11 - version 4.6.0 * Add: Declare incompatibility with WooCommerce High-Performance Order Storage (HPOS). * Fix: Move One Time Shipping metabox fields to use the woocommerce_product_options_shipping_product_data hook introduced in WC 6.0. diff --git a/includes/admin/class-wcs-admin-reports.php b/includes/admin/class-wcs-admin-reports.php index 7abe099..5413d26 100644 --- a/includes/admin/class-wcs-admin-reports.php +++ b/includes/admin/class-wcs-admin-reports.php @@ -23,6 +23,12 @@ class WCS_Admin_Reports { * Constructor */ public function __construct() { + // The subscription reports are incompatible with stores running HPOS with sycning disabled. + if ( wcs_is_custom_order_tables_usage_enabled() && ! wcs_is_custom_order_tables_data_sync_enabled() ) { + add_action( 'admin_notices', [ __CLASS__, 'display_hpos_incompatibility_notice' ] ); + return; + } + // Add the reports layout to the WooCommerce -> Reports admin section add_filter( 'woocommerce_admin_reports', __CLASS__ . '::initialize_reports', 12, 1 ); @@ -33,6 +39,35 @@ class WCS_Admin_Reports { add_action( 'current_screen', __CLASS__ . '::conditional_reporting_includes' ); } + /** + * Displays an admin notice indicating subscription reports are disabled on HPOS environments with no syncing. + */ + public static function display_hpos_incompatibility_notice() { + $screen = get_current_screen(); + + // Only display the admin notice on report admin screens. + if ( ! $screen || 'woocommerce_page_wc-reports' !== $screen->id ) { + return; + } + + $admin_notice = new WCS_Admin_Notice( 'error' ); + + $admin_notice->set_html_content( + sprintf( + '

%s

%s

', + _x( 'WooCommerce Subscriptions - Reports Not Available', 'heading used in an admin notice', 'woocommerce-subscriptions' ), + sprintf( + // translators: placeholders $1 and $2 are opening tags linking to the WooCommerce documentation on HPOS and data synchronization. Placeholder $3 is a closing link () tag. + __( 'Subscription reports are incompatible with the %1$sWooCommerce data storage features%3$s enabled on your store. Please enable %2$stable synchronization%3$s if you wish to use subscription reports.', 'woocommerce-subscriptions' ), + '', + '', + '' + ) + ) + ); + $admin_notice->display(); + } + /** * Add the 'Subscriptions' report type to the WooCommerce reports screen. * @@ -99,7 +134,7 @@ class WCS_Admin_Reports { $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; $screen = get_current_screen(); $wc_screen_id = sanitize_title( __( 'WooCommerce', 'woocommerce-subscriptions' ) ); - $version = WC_Subscriptions_Plugin::instance()->get_plugin_version(); + $version = WC_Subscriptions_Core_Plugin::instance()->get_library_version(); // Reports Subscriptions Pages if ( in_array( $screen->id, apply_filters( 'woocommerce_reports_screen_ids', array( $wc_screen_id . '_page_wc-reports', 'toplevel_page_wc-reports', 'dashboard' ) ) ) && isset( $_GET['tab'] ) && 'subscriptions' == $_GET['tab'] ) { @@ -172,7 +207,7 @@ class WCS_Admin_Reports { $properties = array( 'orders_count' => array_sum( (array) wp_count_posts( 'shop_order' ) ), 'subscriptions_count' => array_sum( (array) wp_count_posts( 'shop_subscription' ) ), - 'subscriptions_version' => WC_Subscriptions_Plugin::instance()->get_plugin_version(), + 'subscriptions_version' => WC_Subscriptions_Plugin::instance()->get_plugin_version(), // get_plugin_version() is used here to report the correct WCS version. ); if ( in_array( $name, array( 'subscription-events-by-date', 'upcoming-recurring-revenue', 'subscription-payment-retry' ), true ) ) { diff --git a/includes/admin/reports/class-wcs-report-dashboard.php b/includes/admin/reports/class-wcs-report-dashboard.php index 01866aa..8e4a09d 100644 --- a/includes/admin/reports/class-wcs-report-dashboard.php +++ b/includes/admin/reports/class-wcs-report-dashboard.php @@ -258,7 +258,7 @@ class WCS_Report_Dashboard { * @since 2.1 */ public static function dashboard_scripts() { - wp_enqueue_style( 'wcs-dashboard-report', WC_Subscriptions_Plugin::instance()->get_plugin_directory_url( 'assets/css/dashboard.css' ), array(), WC_Subscriptions_Plugin::instance()->get_plugin_version() ); + wp_enqueue_style( 'wcs-dashboard-report', WC_Subscriptions_Plugin::instance()->get_plugin_directory_url( 'assets/css/dashboard.css' ), array(), WC_Subscriptions_Plugin::instance()->get_library_version() ); } /** diff --git a/includes/admin/reports/class-wcs-report-subscription-by-customer.php b/includes/admin/reports/class-wcs-report-subscription-by-customer.php index 20f0d60..2738b40 100644 --- a/includes/admin/reports/class-wcs-report-subscription-by-customer.php +++ b/includes/admin/reports/class-wcs-report-subscription-by-customer.php @@ -41,13 +41,13 @@ class WCS_Report_Subscription_By_Customer extends WP_List_Table { echo '
'; echo '
'; echo '

' . esc_html__( 'Customer Totals', 'woocommerce-subscriptions' ) . '

'; - echo '

' . esc_html__( 'Total Subscribers', 'woocommerce-subscriptions' ) . ': ' . esc_html( $this->totals->total_customers ) . wcs_help_tip( __( 'The number of unique customers with a subscription of any status other than pending or trashed.', 'woocommerce-subscriptions' ) ) . '
'; - echo ' ' . esc_html__( 'Active Subscriptions', 'woocommerce-subscriptions' ) . ': ' . esc_html( $this->totals->active_subscriptions ) . wcs_help_tip( __( 'The total number of subscriptions with a status of active or pending cancellation.', 'woocommerce-subscriptions' ) ) . '
'; - echo ' ' . esc_html__( 'Total Subscriptions', 'woocommerce-subscriptions' ) . ': ' . esc_html( $this->totals->total_subscriptions ) . wcs_help_tip( __( 'The total number of subscriptions with a status other than pending or trashed.', 'woocommerce-subscriptions' ) ) . '
'; - echo ' ' . esc_html__( 'Total Subscription Orders', 'woocommerce-subscriptions' ) . ': ' . esc_html( $this->totals->initial_order_count + $this->totals->renewal_switch_count ) . wcs_help_tip( __( 'The total number of sign-up, switch and renewal orders placed with your store with a paid status (i.e. processing or complete).', 'woocommerce-subscriptions' ) ) . '
'; + echo '

' . esc_html__( 'Total Subscribers', 'woocommerce-subscriptions' ) . ': ' . esc_html( $this->totals->total_customers ) . wc_help_tip( __( 'The number of unique customers with a subscription of any status other than pending or trashed.', 'woocommerce-subscriptions' ) ) . '
'; + echo ' ' . esc_html__( 'Active Subscriptions', 'woocommerce-subscriptions' ) . ': ' . esc_html( $this->totals->active_subscriptions ) . wc_help_tip( __( 'The total number of subscriptions with a status of active or pending cancellation.', 'woocommerce-subscriptions' ) ) . '
'; + echo ' ' . esc_html__( 'Total Subscriptions', 'woocommerce-subscriptions' ) . ': ' . esc_html( $this->totals->total_subscriptions ) . wc_help_tip( __( 'The total number of subscriptions with a status other than pending or trashed.', 'woocommerce-subscriptions' ) ) . '
'; + echo ' ' . esc_html__( 'Total Subscription Orders', 'woocommerce-subscriptions' ) . ': ' . esc_html( $this->totals->initial_order_count + $this->totals->renewal_switch_count ) . wc_help_tip( __( 'The total number of sign-up, switch and renewal orders placed with your store with a paid status (i.e. processing or complete).', 'woocommerce-subscriptions' ) ) . '
'; echo ' ' . esc_html__( 'Average Lifetime Value', 'woocommerce-subscriptions' ) . ': '; echo wp_kses_post( wc_price( $this->totals->total_customers > 0 ? ( ( $this->totals->initial_order_total + $this->totals->renewal_switch_total ) / $this->totals->total_customers ) : 0 ) ); - echo wcs_help_tip( __( 'The average value of all customers\' sign-up, switch and renewal orders.', 'woocommerce-subscriptions' ) ) . '

'; + echo wc_help_tip( __( 'The average value of all customers\' sign-up, switch and renewal orders.', 'woocommerce-subscriptions' ) ) . '

'; echo '
'; $this->display(); echo '
'; @@ -96,13 +96,13 @@ class WCS_Report_Subscription_By_Customer extends WP_List_Table { $columns = array( 'customer_name' => __( 'Customer', 'woocommerce-subscriptions' ), // translators: %s: help tip. - 'active_subscription_count' => sprintf( __( 'Active Subscriptions %s', 'woocommerce-subscriptions' ), wcs_help_tip( __( 'The number of subscriptions this customer has with a status of active or pending cancellation.', 'woocommerce-subscriptions' ) ) ), + 'active_subscription_count' => sprintf( __( 'Active Subscriptions %s', 'woocommerce-subscriptions' ), wc_help_tip( __( 'The number of subscriptions this customer has with a status of active or pending cancellation.', 'woocommerce-subscriptions' ) ) ), // translators: %s: help tip. - 'total_subscription_count' => sprintf( __( 'Total Subscriptions %s', 'woocommerce-subscriptions' ), wcs_help_tip( __( 'The number of subscriptions this customer has with a status other than pending or trashed.', 'woocommerce-subscriptions' ) ) ), + 'total_subscription_count' => sprintf( __( 'Total Subscriptions %s', 'woocommerce-subscriptions' ), wc_help_tip( __( 'The number of subscriptions this customer has with a status other than pending or trashed.', 'woocommerce-subscriptions' ) ) ), // translators: %s: help tip. - 'total_subscription_order_count' => sprintf( __( 'Total Subscription Orders %s', 'woocommerce-subscriptions' ), wcs_help_tip( __( 'The number of sign-up, switch and renewal orders this customer has placed with your store with a paid status (i.e. processing or complete).', 'woocommerce-subscriptions' ) ) ), + 'total_subscription_order_count' => sprintf( __( 'Total Subscription Orders %s', 'woocommerce-subscriptions' ), wc_help_tip( __( 'The number of sign-up, switch and renewal orders this customer has placed with your store with a paid status (i.e. processing or complete).', 'woocommerce-subscriptions' ) ) ), // translators: %s: help tip. - 'customer_lifetime_value' => sprintf( __( 'Lifetime Value from Subscriptions %s', 'woocommerce-subscriptions' ), wcs_help_tip( __( 'The total value of this customer\'s sign-up, switch and renewal orders.', 'woocommerce-subscriptions' ) ) ), + 'customer_lifetime_value' => sprintf( __( 'Lifetime Value from Subscriptions %s', 'woocommerce-subscriptions' ), wc_help_tip( __( 'The total value of this customer\'s sign-up, switch and renewal orders.', 'woocommerce-subscriptions' ) ) ), ); return $columns; diff --git a/includes/admin/reports/class-wcs-report-subscription-by-product.php b/includes/admin/reports/class-wcs-report-subscription-by-product.php index b1d6249..d315be7 100644 --- a/includes/admin/reports/class-wcs-report-subscription-by-product.php +++ b/includes/admin/reports/class-wcs-report-subscription-by-product.php @@ -88,11 +88,11 @@ class WCS_Report_Subscription_By_Product extends WP_List_Table { $columns = array( 'product_name' => __( 'Subscription Product', 'woocommerce-subscriptions' ), // translators: %s: help tip. - 'subscription_count' => sprintf( __( 'Subscription Count %s', 'woocommerce-subscriptions' ), wcs_help_tip( __( 'The number of subscriptions that include this product as a line item and have a status other than pending or trashed.', 'woocommerce-subscriptions' ) ) ), + 'subscription_count' => sprintf( __( 'Subscription Count %s', 'woocommerce-subscriptions' ), wc_help_tip( __( 'The number of subscriptions that include this product as a line item and have a status other than pending or trashed.', 'woocommerce-subscriptions' ) ) ), // translators: %s: help tip. - 'average_recurring_total' => sprintf( __( 'Average Recurring Line Total %s', 'woocommerce-subscriptions' ), wcs_help_tip( __( 'The average line total for this product on each subscription.', 'woocommerce-subscriptions' ) ) ), + 'average_recurring_total' => sprintf( __( 'Average Recurring Line Total %s', 'woocommerce-subscriptions' ), wc_help_tip( __( 'The average line total for this product on each subscription.', 'woocommerce-subscriptions' ) ) ), // translators: %s: help tip. - 'average_lifetime_value' => sprintf( __( 'Average Lifetime Value %s', 'woocommerce-subscriptions' ), wcs_help_tip( __( 'The average line total on all orders for this product line item.', 'woocommerce-subscriptions' ) ) ), + 'average_lifetime_value' => sprintf( __( 'Average Lifetime Value %s', 'woocommerce-subscriptions' ), wc_help_tip( __( 'The average line total on all orders for this product line item.', 'woocommerce-subscriptions' ) ) ), ); return $columns; diff --git a/includes/api/class-wc-rest-subscription-system-status-manager.php b/includes/api/class-wc-rest-subscription-system-status-manager.php index cdd29b8..65ea247 100644 --- a/includes/api/class-wc-rest-subscription-system-status-manager.php +++ b/includes/api/class-wc-rest-subscription-system-status-manager.php @@ -16,7 +16,7 @@ class WC_REST_Subscription_System_Status_Manager { * Attach callbacks. */ public static function init() { - add_filter( 'woocommerce_rest_prepare_system_status', array( __CLASS__, 'add_subscription_fields_to_reponse' ) ); + add_filter( 'woocommerce_rest_prepare_system_status', array( __CLASS__, 'add_subscription_fields_to_response' ) ); add_filter( 'woocommerce_rest_system_status_schema', array( __CLASS__, 'add_additional_fields_to_schema' ) ); } @@ -24,11 +24,13 @@ class WC_REST_Subscription_System_Status_Manager { * Adds subscription fields to System Status response. * * @since 3.1.0 + * @deprecated 4.8.0 * * @param WP_REST_Response $response The base system status response. * @return WP_REST_Response */ public static function add_subscription_fields_to_reponse( $response ) { + wcs_deprecated_function( __METHOD__, '4.8.0', __CLASS__ . '::add_subscription_fields_to_response' ); $response->data['subscriptions'] = array( 'wcs_debug' => defined( 'WCS_DEBUG' ) ? WCS_DEBUG : false, 'mode' => ( WCS_Staging::is_duplicate_site() ) ? __( 'staging', 'woocommerce-subscriptions' ) : __( 'live', 'woocommerce-subscriptions' ), @@ -43,6 +45,31 @@ class WC_REST_Subscription_System_Status_Manager { return $response; } + /** + * Adds subscription fields to System Status response. + * + * @since 4.8.0 + * + * @param WP_REST_Response $response The base system status response. + * @return WP_REST_Response + */ + public static function add_subscription_fields_to_response( $response ) { + $count_by_status = array_filter( (array) WC_Data_Store::load( 'subscription' )->get_subscriptions_count_by_status() ); + + $response->data['subscriptions'] = array( + 'wcs_debug' => defined( 'WCS_DEBUG' ) ? WCS_DEBUG : false, + 'mode' => ( WCS_Staging::is_duplicate_site() ) ? __( 'staging', 'woocommerce-subscriptions' ) : __( 'live', 'woocommerce-subscriptions' ), + 'live_url' => esc_url( WCS_Staging::get_site_url_from_source( 'subscriptions_install' ) ), + 'statuses' => array_map( 'strval', $count_by_status ), // Enforce values as strings. + 'report_cache_enabled' => ( 'yes' === get_option( 'woocommerce_subscriptions_cache_updates_enabled', 'yes' ) ), + 'cache_update_failures' => absint( get_option( 'woocommerce_subscriptions_cache_updates_failures', 0 ) ), + 'subscriptions_by_payment_gateway' => WCS_Admin_System_Status::get_subscriptions_by_gateway(), + 'payment_gateway_feature_support' => self::get_payment_gateway_feature_support(), + ); + + return $response; + } + /** * Gets the store's payment gateways and the features they support. * @@ -53,7 +80,7 @@ class WC_REST_Subscription_System_Status_Manager { $gateway_features = array(); foreach ( WC()->payment_gateways->get_available_payment_gateways() as $gateway_id => $gateway ) { - // Some gateways include array keys. For consistancy, only send the values. + // Some gateways include array keys. For consistency, only send the values. $gateway_features[ $gateway_id ] = array_values( (array) apply_filters( 'woocommerce_subscriptions_payment_gateway_features_list', $gateway->supports, $gateway ) ); if ( 'paypal' === $gateway_id && WCS_PayPal::are_reference_transactions_enabled() ) { @@ -81,26 +108,26 @@ class WC_REST_Subscription_System_Status_Manager { 'context' => array( 'view' ), 'readonly' => true, 'properties' => array( - 'wcs_debug_enabled' => array( + 'wcs_debug_enabled' => array( 'description' => __( 'WCS debug constant.', 'woocommerce-subscriptions' ), 'type' => 'boolean', 'context' => array( 'view' ), 'readonly' => true, ), - 'mode' => array( + 'mode' => array( 'description' => __( 'Subscriptions Mode', 'woocommerce-subscriptions' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), - 'live_url' => array( + 'live_url' => array( 'description' => __( 'Subscriptions Live Site URL', 'woocommerce-subscriptions' ), 'type' => 'string', 'format' => 'uri', 'context' => array( 'view' ), 'readonly' => true, ), - 'statuses' => array( + 'statuses' => array( 'description' => __( 'Subscriptions broken down by status.', 'woocommerce-subscriptions' ), 'type' => 'array', 'context' => array( 'view' ), @@ -109,13 +136,13 @@ class WC_REST_Subscription_System_Status_Manager { 'type' => 'string', ), ), - 'report_cache_enabled' => array( + 'report_cache_enabled' => array( 'description' => __( 'Whether the Report Cache is enabled.', 'woocommerce-subscriptions' ), 'type' => 'boolean', 'context' => array( 'view' ), 'readonly' => true, ), - 'cache_update_failures' => array( + 'cache_update_failures' => array( 'description' => __( 'Number of report cache failures.', 'woocommerce-subscriptions' ), 'type' => 'integer', 'context' => array( 'view' ), @@ -130,7 +157,7 @@ class WC_REST_Subscription_System_Status_Manager { 'type' => 'string', ), ), - 'payment_gateway_feature_support' => array( + 'payment_gateway_feature_support' => array( 'description' => __( 'Payment Gateway Feature Support.', 'woocommerce-subscriptions' ), 'type' => 'array', 'context' => array( 'view' ), diff --git a/includes/api/class-wc-rest-subscriptions-controller.php b/includes/api/class-wc-rest-subscriptions-controller.php index 01c72f7..d1af3ff 100644 --- a/includes/api/class-wc-rest-subscriptions-controller.php +++ b/includes/api/class-wc-rest-subscriptions-controller.php @@ -42,7 +42,7 @@ class WC_REST_Subscriptions_Controller extends WC_REST_Orders_Controller { public function register_routes() { parent::register_routes(); - register_rest_route( $this->namespace, "/{$this->rest_base}/statuses", array( + register_rest_route( $this->namespace, "/{$this->rest_base}/statuses", array( // nosemgrep: audit.php.wp.security.rest-route.permission-callback.return-true -- /subscriptions/statuses is a public endpoint and doesn't need any permission checks. array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_statuses' ), diff --git a/includes/api/legacy/class-wc-rest-subscriptions-controller.php b/includes/api/legacy/class-wc-rest-subscriptions-controller.php index 82fe7d5..a518d1a 100644 --- a/includes/api/legacy/class-wc-rest-subscriptions-controller.php +++ b/includes/api/legacy/class-wc-rest-subscriptions-controller.php @@ -61,7 +61,7 @@ class WC_REST_Subscriptions_Controller extends WC_REST_Orders_Controller { 'schema' => array( $this, 'get_public_item_schema' ), ) ); - register_rest_route( $this->namespace, '/' . $this->rest_base . '/statuses', array( + register_rest_route( $this->namespace, '/' . $this->rest_base . '/statuses', array( // nosemgrep: audit.php.wp.security.rest-route.permission-callback.return-true -- /subscriptions/statuses is a public endpoint and doesn't need any permission checks. array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_statuses' ), diff --git a/includes/api/v1/class-wc-rest-subscriptions-v1-controller.php b/includes/api/v1/class-wc-rest-subscriptions-v1-controller.php index ea99587..0273efa 100644 --- a/includes/api/v1/class-wc-rest-subscriptions-v1-controller.php +++ b/includes/api/v1/class-wc-rest-subscriptions-v1-controller.php @@ -60,7 +60,7 @@ class WC_REST_Subscriptions_V1_Controller extends WC_REST_Orders_V1_Controller { 'schema' => array( $this, 'get_public_item_schema' ), ) ); - register_rest_route( $this->namespace, '/' . $this->rest_base . '/statuses', array( + register_rest_route( $this->namespace, '/' . $this->rest_base . '/statuses', array( // nosemgrep: audit.php.wp.security.rest-route.permission-callback.return-true -- /subscriptions/statuses is a public endpoint and doesn't need any permission checks. array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_statuses' ), @@ -301,16 +301,14 @@ class WC_REST_Subscriptions_V1_Controller extends WC_REST_Orders_V1_Controller { $orders = array(); foreach ( $subscription_orders as $order_id ) { - $post = get_post( $order_id ); - // Validate that the order can be loaded before trying to generate a response object for it. $order = wc_get_order( $order_id ); - if ( ! $order || ! wc_rest_check_post_permissions( $this->post_type, 'read', $post->ID ) ) { + if ( ! $order || ! wc_rest_check_post_permissions( $this->post_type, 'read', $order_id ) ) { continue; } - $response = $this->prepare_item_for_response( $post, $request ); + $response = $this->prepare_item_for_response( $order, $request ); foreach ( array( 'parent', 'renewal', 'switch' ) as $order_type ) { if ( wcs_order_contains_subscription( $order_id, $order_type ) ) { diff --git a/includes/class-wc-subscriptions-dependency-manager.php b/includes/class-wc-subscriptions-dependency-manager.php new file mode 100644 index 0000000..f600368 --- /dev/null +++ b/includes/class-wc-subscriptions-dependency-manager.php @@ -0,0 +1,161 @@ +minimum_supported_wc_version = $minimum_supported_wc_version; + } + + /** + * Checks if the required dependencies are met. + * + * @since 5.0.0 + * @return bool True if the required dependencies are met. Otherwise, false. + */ + public function has_valid_dependencies() { + // We don't need to check is_woocommerce_active() here because is_woocommerce_version_supported() will return false if WooCommerce is not active. + return $this->is_woocommerce_version_supported(); + } + + /** + * Determines if the WooCommerce plugin is active. + * + * @since 5.0.0 + * @return bool True if the plugin is active, false otherwise. + */ + public function is_woocommerce_active() { + if ( class_exists( 'WooCommerce' ) ) { + return true; + } + + return $this->get_woocommerce_active_version() !== null; + } + + /** + * Determines if the WooCommerce version is supported by Subscriptions. + * + * The minimum supported WooCommerce version is defined in the WC_Subscriptions::$wc_minimum_supported_version property. + * + * @return bool true if the WooCommerce version is supported, false otherwise. + */ + public function is_woocommerce_version_supported() { + return version_compare( + // In php8.2+ version_compare requires a string so ensure we always pass a string. + // version_compare treats an empty string as less than 0. + $this->get_woocommerce_active_version() ?? '', + $this->minimum_supported_wc_version, + '>=' + ); + } + + /** + * This method detects the active version of WooCommerce. + * + * The resulting version is based on the WooCommerce plugin data. The WooCommerce plugin is determined by this logic: + * 1. Installed at 'woocommerce/woocommerce.php' + * 2. Installed at any '{x}/woocommerce.php' where the plugin name is 'WooCommerce' + * + * @return string|null The active WooCommerce version, or null if WooCommerce is not active. + */ + private function get_woocommerce_active_version() { + // Use a cached value to avoid calling get_plugins() and looping multiple times. + if ( true === $this->wc_version_cached ) { + return $this->wc_active_version; + } + + $this->wc_version_cached = true; + + // Load plugin.php if it's not already loaded. + if ( ! function_exists( 'is_plugin_active' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } + + // Loop through all active plugins and check if WooCommerce is active. + foreach ( get_plugins() as $plugin_slug => $plugin_data ) { + $is_woocommerce = false; + + /** + * The WooCommerce plugin can be installed in two supported ways: + * 1. Installed at 'woocommerce/woocommerce.php' + * 2. Installed at any '{x}/woocommerce.php' where the plugin name is 'WooCommerce' + */ + if ( 'woocommerce/woocommerce.php' === $plugin_slug ) { + $is_woocommerce = true; + } elseif ( 'woocommerce.php' === basename( $plugin_slug ) && 'WooCommerce' === $plugin_data['Name'] ) { + $is_woocommerce = true; + } + + if ( $is_woocommerce && is_plugin_active( $plugin_slug ) ) { + $this->wc_active_version = $plugin_data['Version']; + } + } + + return $this->wc_active_version; + } + + /** + * Displays an admin notice if the required dependencies are not met. + * + * @since 5.0.0 + */ + public function display_dependency_admin_notice() { + if ( ! current_user_can( 'activate_plugins' ) ) { + return; + } + + $admin_notice_content = ''; + + if ( ! $this->is_woocommerce_active() ) { + $install_url = wp_nonce_url( + add_query_arg( + array( + 'action' => 'install-plugin', + 'plugin' => 'woocommerce', + ), + admin_url( 'update.php' ) + ), + 'install-plugin_woocommerce' + ); + + // translators: 1$-2$: opening and closing tags, 3$-4$: link tags, takes to woocommerce plugin on wp.org, 5$-6$: opening and closing link tags, leads to plugins.php in admin + $admin_notice_content = sprintf( esc_html__( '%1$sWooCommerce Subscriptions is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for WooCommerce Subscriptions to work. Please %5$sinstall & activate WooCommerce »%6$s', 'woocommerce-subscriptions' ), '', '', '', '', '', '' ); + } elseif ( ! $this->is_woocommerce_version_supported() ) { + // translators: 1$-2$: opening and closing tags, 3$: minimum supported WooCommerce version, 4$-5$: opening and closing link tags, leads to plugin admin + $admin_notice_content = sprintf( esc_html__( '%1$sWooCommerce Subscriptions is inactive.%2$s This version of Subscriptions requires WooCommerce %3$s or newer. Please %4$supdate WooCommerce to version %3$s or newer »%5$s', 'woocommerce-subscriptions' ), '', '', $this->minimum_supported_wc_version, '', '' ); + } + + if ( $admin_notice_content ) { + echo '
'; + echo '

' . wp_kses_post( $admin_notice_content ) . '

'; + echo '
'; + } + } +} diff --git a/includes/class-wc-subscriptions-plugin.php b/includes/class-wc-subscriptions-plugin.php index f77c24e..c306bdf 100644 --- a/includes/class-wc-subscriptions-plugin.php +++ b/includes/class-wc-subscriptions-plugin.php @@ -8,6 +8,9 @@ defined( 'ABSPATH' ) || exit; +/** + * @method static WC_Subscriptions_Plugin instance() + */ class WC_Subscriptions_Plugin extends WC_Subscriptions_Core_Plugin { /** @@ -52,7 +55,7 @@ class WC_Subscriptions_Plugin extends WC_Subscriptions_Core_Plugin { $notice = new WCS_Admin_Notice( 'error' ); // translators: 1-2: opening/closing tags, 3: Subscriptions version. - $notice->set_simple_content( sprintf( __( '%1$sWarning!%2$s We can see the %1$sWooCommerce Subscriptions Early Renewal%2$s plugin is active. Version %3$s of %1$sWooCommerce Subscriptions%2$s comes with that plugin\'s functionality packaged into the core plugin. Please deactivate WooCommerce Subscriptions Early Renewal to avoid any conflicts.', 'woocommerce-subscriptions' ), '', '', $this->get_plugin_version() ) ); + $notice->set_simple_content( sprintf( __( '%1$sWarning!%2$s We can see the %1$sWooCommerce Subscriptions Early Renewal%2$s plugin is active. Version %3$s of %1$sWooCommerce Subscriptions%2$s comes with that plugin\'s functionality packaged into the core plugin. Please deactivate WooCommerce Subscriptions Early Renewal to avoid any conflicts.', 'woocommerce-subscriptions' ), '', '', $this->get_plugin_version() ) ); // get_plugin_version() is used here to report the correct WCS version. $notice->set_actions( array( array( @@ -117,9 +120,14 @@ class WC_Subscriptions_Plugin extends WC_Subscriptions_Core_Plugin { } /** - * Gets the plugin's version + * Gets the version of WooCommerce Subscriptions. + * + * NOTE: This function should only be used to get the version of WooCommerce Subscriptions. + * `WC_Subscriptions_Core_Plugin::instance()->get_plugin_version()` will return either the version of WooCommerce Subscriptions (if installed) or the version of WooCommerce Subscriptions Core. + * `WC_Subscriptions_Core_Plugin::instance()->get_library_version()` should be used to get the version of WooCommerce Subscriptions Core. * * @since 4.0.0 + * @see get_library_version() * @return string The plugin version. */ public function get_plugin_version() { diff --git a/includes/class-wcs-limited-recurring-coupon-manager.php b/includes/class-wcs-limited-recurring-coupon-manager.php index ffa5ae5..eca80a1 100644 --- a/includes/class-wcs-limited-recurring-coupon-manager.php +++ b/includes/class-wcs-limited-recurring-coupon-manager.php @@ -64,7 +64,7 @@ class WCS_Limited_Recurring_Coupon_Manager { */ public static function save_coupon_fields( $id ) { // Check the nonce (again). - if ( empty( $_POST['woocommerce_meta_nonce'] ) || ! wp_verify_nonce( $_POST['woocommerce_meta_nonce'], 'woocommerce_save_data' ) ) { + if ( empty( $_POST['woocommerce_meta_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['woocommerce_meta_nonce'] ) ), 'woocommerce_save_data' ) ) { return; } @@ -345,7 +345,7 @@ class WCS_Limited_Recurring_Coupon_Manager { $change_payment = isset( $_GET['change_payment_method'] ) ? wc_clean( $_GET['change_payment_method'] ) : 0; $has_limited_coupon = false; - if ( $change_payment && isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'] ) ) { + if ( $change_payment && isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) ) ) { $subscription = wcs_get_subscription( $change_payment ); $has_limited_coupon = self::order_has_limited_recurring_coupon( $subscription ); } diff --git a/includes/class-wcs-upgrade-notice-manager.php b/includes/class-wcs-upgrade-notice-manager.php index e008f83..3c307c8 100644 --- a/includes/class-wcs-upgrade-notice-manager.php +++ b/includes/class-wcs-upgrade-notice-manager.php @@ -68,7 +68,7 @@ class WCS_Upgrade_Notice_Manager { */ public static function maybe_show_admin_notice() { - if ( isset( $_GET['_wcsnonce'] ) && wp_verify_nonce( $_GET['_wcsnonce'], 'dismiss_upgrade_notice' ) && ! empty( $_GET['dismiss_upgrade_notice'] ) && self::$version === $_GET['dismiss_upgrade_notice'] ) { + if ( isset( $_GET['_wcsnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wcsnonce'] ) ) , 'dismiss_upgrade_notice' ) && ! empty( $_GET['dismiss_upgrade_notice'] ) && self::$version === $_GET['dismiss_upgrade_notice'] ) { delete_option( self::$option_name ); return; } diff --git a/includes/class-wcs-webhooks.php b/includes/class-wcs-webhooks.php index 97e11cc..9fa8f0c 100644 --- a/includes/class-wcs-webhooks.php +++ b/includes/class-wcs-webhooks.php @@ -127,7 +127,10 @@ class WCS_Webhooks { $webhook = new WC_Webhook( $id ); $current_user = get_current_user_id(); - wp_set_current_user( $webhook->get_user_id() ); + // Build the payload with the same user context as the user who created + // the webhook -- this avoids permission errors as background processing + // runs with no user context. + wp_set_current_user( $webhook->get_user_id() ); // phpcs:ignore Generic.PHP.ForbiddenFunctions.Discouraged -- user ID can only be provided by WC_Webhook::get_user_id() which is the webhook author's ID. switch ( $webhook->get_api_version() ) { case 'legacy_v3': @@ -150,7 +153,8 @@ class WCS_Webhooks { break; } - wp_set_current_user( $current_user ); + // Restore the current user. + wp_set_current_user( $current_user ); // phpcs:ignore Generic.PHP.ForbiddenFunctions.Discouraged -- this ID was provided by get_current_user_id() above. } return $payload; diff --git a/includes/early-renewal/class-wcs-cart-early-renewal.php b/includes/early-renewal/class-wcs-cart-early-renewal.php index 50a40da..a3d05b1 100644 --- a/includes/early-renewal/class-wcs-cart-early-renewal.php +++ b/includes/early-renewal/class-wcs-cart-early-renewal.php @@ -173,9 +173,9 @@ class WCS_Cart_Early_Renewal extends WCS_Cart_Renewal { if ( $subscription ) { // Copy all meta, excluding core properties (totals etc), from the subscription to new renewal order - add_filter( 'wcs_renewal_order_meta', array( $this, 'exclude_core_order_meta_properties' ) ); + add_filter( 'wc_subscriptions_renewal_order_data', array( $this, 'exclude_core_properties_from_copy' ) ); wcs_copy_order_meta( $subscription, $order, 'renewal_order' ); - remove_filter( 'wcs_renewal_order_meta', array( $this, 'exclude_core_order_meta_properties' ) ); + remove_filter( 'wc_subscriptions_renewal_order_data', array( $this, 'exclude_core_properties_from_copy' ) ); } } } @@ -198,7 +198,7 @@ class WCS_Cart_Early_Renewal extends WCS_Cart_Renewal { $subscription = wcs_get_subscription( $cart_item[ $this->cart_item_key ]['subscription_id'] ); // Mark this order as a renewal. - $order->update_meta_data( '_subscription_renewal', $subscription->get_id() ); + WCS_Related_Order_Store::instance()->add_relation( $order, $subscription, 'renewal' ); // Mark this order as an early renewal. $order->update_meta_data( '_subscription_renewal_early', $subscription->get_id() ); @@ -389,7 +389,7 @@ class WCS_Cart_Early_Renewal extends WCS_Cart_Renewal { * @since 2.3.0 */ public static function allow_early_renewal_order_cancellation() { - if ( isset( $_GET['cancel_order'] ) && isset( $_GET['order_id'] ) && isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'woocommerce-cancel_order' ) ) { + if ( isset( $_GET['cancel_order'], $_GET['order_id'], $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ), 'woocommerce-cancel_order' ) ) { $order_id = absint( $_GET['order_id'] ); $order = wc_get_order( $order_id ); @@ -399,6 +399,64 @@ class WCS_Cart_Early_Renewal extends WCS_Cart_Renewal { } } + /** + * Excludes core properties from being copied to the renewal order when an early renewal is created. + * + * These core order properties are set when the order is created via the checkout and should not be + * copied from the subscription in case they were changed via the checkout process. + * + * @since 4.8.0 + * + * @param array $order_data The data to be copied to the early renewal order. Each value is keyed by the meta key. Example format [ '_meta_key' => 'meta_value' ]. + * @return array $order_data The filtered set of order data. + */ + public function exclude_core_properties_from_copy( $order_data ) { + $excluded_properties = array( + '_customer_user', + '_order_currency', + '_prices_include_tax', + '_order_version', + '_shipping_first_name', + '_shipping_last_name', + '_shipping_company', + '_shipping_address_1', + '_shipping_address_2', + '_shipping_city', + '_shipping_state', + '_shipping_postcode', + '_shipping_country', + '_shipping_address_index', + '_billing_first_name', + '_billing_last_name', + '_billing_company', + '_billing_address_1', + '_billing_address_2', + '_billing_city', + '_billing_state', + '_billing_postcode', + '_billing_country', + '_billing_email', + '_billing_phone', + '_billing_address_index', + 'is_vat_exempt', + '_customer_ip_address', + '_customer_user_agent', + '_cart_discount', + '_cart_discount_tax', + '_order_shipping', + '_order_shipping_tax', + '_order_tax', + '_order_total', + ); + + // Remove the core order properties from the data copied from the subscription. + foreach ( $excluded_properties as $meta_key ) { + unset( $order_data[ $meta_key ] ); + } + + return $order_data; + } + /** * Excludes core order meta properties from the meta copied from the subscription. * @@ -406,11 +464,13 @@ class WCS_Cart_Early_Renewal extends WCS_Cart_Renewal { * when copying meta from the subscription to the early renewal order. * * @since 2.5.6 + * @deprecated 4.8.0 * * @param array $order_meta The meta keys and values to copy from the subscription to the early renewal order. * @return array The subscription meta to copy to the early renewal order. */ public function exclude_core_order_meta_properties( $order_meta ) { + wcs_deprecated_function( __METHOD__, '4.8.0', __CLASS__ . '::exclude_core_properties_from_copy()' ); // Additional meta keys to exclude. These are in addition to the meta keys already excluded by wcs_copy_order_meta(). $excluded_meta_keys = array( diff --git a/includes/early-renewal/class-wcs-early-renewal-modal-handler.php b/includes/early-renewal/class-wcs-early-renewal-modal-handler.php index d6c900b..5f79cde 100644 --- a/includes/early-renewal/class-wcs-early-renewal-modal-handler.php +++ b/includes/early-renewal/class-wcs-early-renewal-modal-handler.php @@ -103,7 +103,7 @@ class WCS_Early_Renewal_Modal_Handler { return; } - if ( ! wp_verify_nonce( $_GET['wcs_nonce'], 'wcs-renew-early-modal-' . $_GET['subscription_id'] ) ) { + if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['wcs_nonce'] ) ), 'wcs-renew-early-modal-' . absint( $_GET['subscription_id'] ) ) ) { wc_add_notice( __( 'There was an error with your request. Please try again.', 'woocommerce-subscriptions' ), 'error' ); self::redirect(); } diff --git a/includes/early-renewal/wcs-early-renewal-functions.php b/includes/early-renewal/wcs-early-renewal-functions.php index 50e264c..4b4d239 100644 --- a/includes/early-renewal/wcs-early-renewal-functions.php +++ b/includes/early-renewal/wcs-early-renewal-functions.php @@ -117,7 +117,7 @@ function wcs_get_early_renewal_url( $subscription ) { * @param string $url The early renewal URL. * @param int $subscription_id The ID of the subscription to renew to. */ - return apply_filters( 'woocommerce_subscriptions_get_early_renewal_url', $url, $subscription_id ); + return apply_filters( 'woocommerce_subscriptions_get_early_renewal_url', $url, $subscription_id ); // nosemgrep: audit.php.wp.security.xss.query-arg -- False positive. $url is escaped in the template and escaping URLs should be done at the point of output or usage. } /** diff --git a/includes/gateways/class-wc-subscriptions-payment-gateways.php b/includes/gateways/class-wc-subscriptions-payment-gateways.php index b61c933..8bfcc7e 100644 --- a/includes/gateways/class-wc-subscriptions-payment-gateways.php +++ b/includes/gateways/class-wc-subscriptions-payment-gateways.php @@ -36,7 +36,7 @@ class WC_Subscriptions_Payment_Gateways extends WC_Subscriptions_Core_Payment_Ga return $available_gateways; } - if ( ! WC_Subscriptions_Cart::cart_contains_subscription() && ( ! isset( $_GET['order_id'] ) || ! wcs_order_contains_subscription( $_GET['order_id'] ) ) ) { + if ( ! WC_Subscriptions_Cart::cart_contains_subscription() && ( ! isset( $_GET['order_id'] ) || ! wcs_order_contains_subscription( absint( $_GET['order_id'] ) ) ) ) { return $available_gateways; } diff --git a/includes/payment-retry/admin/class-wcs-meta-box-payment-retries.php b/includes/payment-retry/admin/class-wcs-meta-box-payment-retries.php index f90e183..eea4957 100644 --- a/includes/payment-retry/admin/class-wcs-meta-box-payment-retries.php +++ b/includes/payment-retry/admin/class-wcs-meta-box-payment-retries.php @@ -20,16 +20,26 @@ if ( ! defined( 'ABSPATH' ) ) { class WCS_Meta_Box_Payment_Retries { /** - * Output the metabox + * Outputs the Payment retry metabox. + * + * @param WC_Order|WP_Post $order The order object or post object. */ - public static function output( $post ) { + public static function output( $order ) { + // For backwards compatibility the $order parameter could be a Post. + if ( is_a( $order, 'WP_Post' ) ) { + $order = wc_get_order( $order->ID ); + } + + if ( ! wcs_is_order( $order ) ) { + return; + } WC()->mailer(); - $retries = WCS_Retry_Manager::store()->get_retries_for_order( $post->ID ); + $retries = WCS_Retry_Manager::store()->get_retries_for_order( $order->get_id() ); include_once( dirname( __FILE__ ) . '/html-retries-table.php' ); - do_action( 'woocommerce_subscriptions_retries_meta_box', $post->ID, $retries ); + do_action( 'woocommerce_subscriptions_retries_meta_box', $order->get_id(), $retries ); } } diff --git a/includes/payment-retry/admin/class-wcs-retry-admin.php b/includes/payment-retry/admin/class-wcs-retry-admin.php index 43d4026..8f0217a 100644 --- a/includes/payment-retry/admin/class-wcs-retry-admin.php +++ b/includes/payment-retry/admin/class-wcs-retry-admin.php @@ -24,7 +24,7 @@ class WCS_Retry_Admin { add_filter( 'woocommerce_subscription_settings', array( $this, 'add_settings' ) ); if ( WCS_Retry_Manager::is_retry_enabled() ) { - add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 50 ); + add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 50, 2 ); add_filter( 'wcs_display_date_type', array( $this, 'maybe_hide_date_type' ), 10, 3 ); @@ -37,13 +37,26 @@ class WCS_Retry_Admin { /** * Add a meta box to the Edit Order screen to display the retries relating to that order + * + * @param string $post_type Optional. Post type. Default empty. + * @param WC_Order|WP_Post $order Optional. The Order object. Default null. If null, the global $post is used. */ - public function add_meta_boxes() { - global $current_screen, $post_ID; + public function add_meta_boxes( $post_type = '', $order = null ) { + /** + * Get the order parameter into a consistent type. + * + * For backwards compatibility, if the order parameter isn't provided, use the global $post_id. + * On CPT stores, the order param will be a WP Post object. + */ + if ( is_null( $order ) || is_a( $order, 'WP_Post' ) ) { + global $post_ID; + $order_id = $order ? $order->ID : $post_ID; + $order = wc_get_order( $order_id ); + } - // Only display the meta box if an order relates to a subscription - if ( 'shop_order' === get_post_type( $post_ID ) && wcs_order_contains_renewal( $post_ID ) && WCS_Retry_Manager::store()->get_retry_count_for_order( $post_ID ) > 0 ) { - add_meta_box( 'renewal_payment_retries', __( 'Automatic Failed Payment Retries', 'woocommerce-subscriptions' ), 'WCS_Meta_Box_Payment_Retries::output', 'shop_order', 'normal', 'low' ); + // Only display the meta box if an order relates to a subscription and there are retries for that order. + if ( wcs_is_order( $order ) && wcs_order_contains_renewal( $order ) && WCS_Retry_Manager::store()->get_retry_count_for_order( $order->get_id() ) > 0 ) { + add_meta_box( 'renewal_payment_retries', __( 'Automatic Failed Payment Retries', 'woocommerce-subscriptions' ), 'WCS_Meta_Box_Payment_Retries::output', wcs_get_page_screen_id( 'shop_order' ), 'normal', 'low' ); } } diff --git a/includes/payment-retry/admin/html-retries-table.php b/includes/payment-retry/admin/html-retries-table.php index d8272cf..6af2b09 100644 --- a/includes/payment-retry/admin/html-retries-table.php +++ b/includes/payment-retry/admin/html-retries-table.php @@ -17,19 +17,19 @@ if ( ! defined( 'ABSPATH' ) ) { - + - + - + - + diff --git a/includes/payment-retry/class-wcs-retry-manager.php b/includes/payment-retry/class-wcs-retry-manager.php index 4801305..6d3a3e1 100644 --- a/includes/payment-retry/class-wcs-retry-manager.php +++ b/includes/payment-retry/class-wcs-retry-manager.php @@ -56,9 +56,6 @@ class WCS_Retry_Manager { add_filter( 'woocommerce_subscription_dates', __CLASS__ . '::add_retry_date_type' ); - add_action( 'delete_post', __CLASS__ . '::maybe_cancel_retry_for_order' ); - add_action( 'wp_trash_post', __CLASS__ . '::maybe_cancel_retry_for_order' ); - add_action( 'woocommerce_subscription_status_updated', __CLASS__ . '::maybe_cancel_retry', 0, 3 ); add_action( 'woocommerce_subscriptions_retry_status_updated', __CLASS__ . '::maybe_delete_payment_retry_date', 0, 2 ); @@ -74,6 +71,9 @@ class WCS_Retry_Manager { add_action( 'woocommerce_subscriptions_before_upgrade', __CLASS__ . '::upgrade', 11, 2 ); + // Attach hooks that depend on WooCommerce being loaded. + add_action( 'woocommerce_loaded', array( __CLASS__, 'attach_wc_dependant_hooks' ) ); + if ( ! self::$table_maker ) { self::$table_maker = new WCS_Retry_Table_Maker(); add_action( 'init', array( self::$table_maker, 'register_tables' ), 0 ); @@ -81,6 +81,26 @@ class WCS_Retry_Manager { } } + /** + * Attaches hooks that depend on WooCommerce being loaded. + * + * We need to use different hooks on stores that have HPOS enabled but to check if this feature + * is enabled, we must wait for WooCommerce to be loaded first. + * + * @since 4.8.0 + */ + public static function attach_wc_dependant_hooks() { + if ( wcs_is_custom_order_tables_usage_enabled() ) { + // Ensure scheduled retries are deleted when a renewal order is deleted or trashed. + add_action( 'woocommerce_before_trash_order', __CLASS__ . '::maybe_cancel_retry_for_order' ); + add_action( 'woocommerce_before_delete_order', __CLASS__ . '::maybe_cancel_retry_for_order' ); + } else { + // Ensure scheduled retries are deleted when a renewal order is deleted or trashed. + add_action( 'delete_post', __CLASS__ . '::maybe_cancel_retry_for_order' ); + add_action( 'wp_trash_post', __CLASS__ . '::maybe_cancel_retry_for_order' ); + } + } + /** * Adds any extra status that may be needed for a given order to check if it may * need payment @@ -154,20 +174,20 @@ class WCS_Retry_Manager { /** * When a (renewal) order is trashed or deleted, make sure its retries are also trashed/deleted. * - * @param int $post_id + * @param int $order_id */ - public static function maybe_cancel_retry_for_order( $post_id ) { + public static function maybe_cancel_retry_for_order( $order_id ) { - if ( 'shop_order' == get_post_type( $post_id ) ) { + if ( 'shop_order' === WC_Data_Store::load( 'order' )->get_order_type( $order_id ) ) { - $last_retry = self::store()->get_last_retry_for_order( $post_id ); + $last_retry = self::store()->get_last_retry_for_order( $order_id ); // Make sure the last retry is cancelled first so that it is unscheduled via self::maybe_delete_payment_retry_date() if ( null !== $last_retry && 'cancelled' !== $last_retry->get_status() ) { $last_retry->update_status( 'cancelled' ); } - foreach ( self::store()->get_retry_ids_for_order( $post_id ) as $retry_id ) { + foreach ( self::store()->get_retry_ids_for_order( $order_id ) as $retry_id ) { self::store()->delete_retry( $retry_id ); } } diff --git a/includes/switching/class-wc-subscriptions-switcher.php b/includes/switching/class-wc-subscriptions-switcher.php index bc30b45..5e1e029 100644 --- a/includes/switching/class-wc-subscriptions-switcher.php +++ b/includes/switching/class-wc-subscriptions-switcher.php @@ -85,7 +85,7 @@ class WC_Subscriptions_Switcher { add_filter( 'woocommerce_subscriptions_product_price_string_inclusions', array( __CLASS__, 'customise_product_string_inclusions' ), 12, 2 ); // Don't carry switch meta data to renewal orders - add_filter( 'wcs_renewal_order_meta_query', array( __CLASS__, 'remove_renewal_order_meta_query' ), 10 ); + add_filter( 'wc_subscriptions_renewal_order_data', array( __CLASS__, 'remove_renewal_order_meta' ), 10 ); // Don't carry switch meta data to renewal orders add_filter( 'woocommerce_subscriptions_recurring_cart_key', array( __CLASS__, 'get_recurring_cart_key' ), 10, 2 ); @@ -149,7 +149,7 @@ class WC_Subscriptions_Switcher { add_action( 'woocommerce_grant_product_download_permissions', array( __CLASS__, 'delay_granting_download_permissions' ), 9, 1 ); add_action( 'woocommerce_subscriptions_switch_completed', array( __CLASS__, 'grant_download_permissions' ), 9, 1 ); add_action( 'woocommerce_subscription_checkout_switch_order_processed', array( __CLASS__, 'log_switches' ) ); - add_filter( 'woocommerce_subscriptions_admin_related_orders_to_display', array( __CLASS__, 'display_switches_in_related_order_metabox' ), 10, 3 ); + add_filter( 'wcs_admin_subscription_related_orders_to_display', array( __CLASS__, 'display_switches_in_related_order_metabox' ), 10, 3 ); // Override the add to cart text when switch args are present. add_filter( 'woocommerce_product_single_add_to_cart_text', array( __CLASS__, 'display_switch_add_to_cart_text' ), 10, 1 ); @@ -188,11 +188,11 @@ class WC_Subscriptions_Switcher { // If the current user doesn't own the subscription, remove the query arg from the URL if ( isset( $_GET['switch-subscription'] ) && isset( $_GET['item'] ) ) { - $subscription = wcs_get_subscription( $_GET['switch-subscription'] ); - $line_item = wcs_get_order_item( $_GET['item'], $subscription ); + $subscription = wcs_get_subscription( absint( $_GET['switch-subscription'] ) ); + $line_item = wcs_get_order_item( absint( $_GET['item'] ), $subscription ); // Visiting a switch link for someone elses subscription or if the switch link doesn't contain a valid nonce - if ( ! is_object( $subscription ) || empty( $_GET['_wcsnonce'] ) || ! wp_verify_nonce( $_GET['_wcsnonce'], 'wcs_switch_request' ) || empty( $line_item ) || ! self::can_item_be_switched_by_user( $line_item, $subscription ) ) { + if ( ! is_object( $subscription ) || empty( $_GET['_wcsnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wcsnonce'] ) ), 'wcs_switch_request' ) || empty( $line_item ) || ! self::can_item_be_switched_by_user( $line_item, $subscription ) ) { wp_redirect( remove_query_arg( array( 'switch-subscription', 'auto-switch', 'item', '_wcsnonce' ) ) ); exit(); @@ -293,7 +293,7 @@ class WC_Subscriptions_Switcher { if ( $last_order->needs_payment() ) { // translators: 1$: is the "You have already subscribed to this product" notice, 2$-4$: opening/closing link tags, 3$: an order number - $subscribed_notice = sprintf( __( '%1$s Complete payment on %2$sOrder %3$s%4$s to be able to change your subscription.', 'woocommerce-subscriptions' ), $subscribed_notice, sprintf( '', $last_order->get_checkout_payment_url() ), $last_order->get_order_number(), '' ); + $subscribed_notice = sprintf( __( '%1$s Complete payment on %2$sOrder %3$s%4$s to be able to change your subscription.', 'woocommerce-subscriptions' ), $subscribed_notice, sprintf( '', esc_url( $last_order->get_checkout_payment_url() ) ), $last_order->get_order_number(), '' ); } wc_add_notice( $subscribed_notice, 'notice' ); @@ -334,7 +334,7 @@ class WC_Subscriptions_Switcher { public static function add_switch_query_arg_grouped( $permalink ) { if ( isset( $_GET['switch-subscription'] ) ) { - $permalink = self::add_switch_query_args( $_GET['switch-subscription'], $_GET['item'], $permalink ); + $permalink = self::add_switch_query_args( absint( $_GET['switch-subscription'] ), absint( $_GET['item'] ), $permalink ); } return $permalink; @@ -359,7 +359,7 @@ class WC_Subscriptions_Switcher { switch ( $type ) { case 'variable-subscription': case 'subscription': - return self::add_switch_query_args( $_GET['switch-subscription'], $_GET['item'], $permalink ); + return self::add_switch_query_args( absint( $_GET['switch-subscription'] ), absint( $_GET['item'] ), $permalink ); case 'grouped': // Check to see if the group contains a subscription. @@ -367,7 +367,7 @@ class WC_Subscriptions_Switcher { foreach ( $children as $child ) { $child_product = wc_get_product( $child ); if ( 'subscription' === wcs_get_objects_property( $child_product, 'type' ) ) { - return self::add_switch_query_args( $_GET['switch-subscription'], $_GET['item'], $permalink ); + return self::add_switch_query_args( absint( $_GET['switch-subscription'] ), absint( $_GET['item'] ), $permalink ); } } @@ -527,7 +527,7 @@ class WC_Subscriptions_Switcher { echo ''; } ?> @@ -620,9 +620,10 @@ class WC_Subscriptions_Switcher { '_wcsnonce' => wp_create_nonce( 'wcs_switch_request' ), ) ); - $permalink = add_query_arg( $query_args, $permalink ); - return apply_filters( 'woocommerce_subscriptions_add_switch_query_args', $permalink, $subscription_id, $item_id ); + $permalink = add_query_arg( $query_args, $permalink ); + + return apply_filters( 'woocommerce_subscriptions_add_switch_query_args', $permalink, $subscription_id, $item_id ); // nosemgrep: audit.php.wp.security.xss.query-arg -- False positive. $permalink is escaped in the template and escaping URLs should be done at the point of output or usage. } /** @@ -914,8 +915,6 @@ class WC_Subscriptions_Switcher { * @since 2.0 */ public static function process_checkout( $order_id, $posted_data = array() ) { - global $wpdb; - if ( ! WC_Subscriptions_Cart::cart_contains_subscription() ) { return; } @@ -924,46 +923,141 @@ class WC_Subscriptions_Switcher { $switch_order_data = array(); try { - foreach ( WC()->cart->recurring_carts as $recurring_cart_key => $recurring_cart ) { + $subscription = false; + // Find the subscription for this recurring cart switch. foreach ( $recurring_cart->get_cart() as $cart_item_key => $cart_item ) { - + // A switch recurring cart shouldn't contain any cart items that are not switched. if ( ! isset( $cart_item['subscription_switch']['subscription_id'] ) ) { - continue; + continue 2; } + // All cart items in a switch recurring cart should have the same subscription ID. $subscription = wcs_get_subscription( $cart_item['subscription_switch']['subscription_id'] ); + break; + } - // If we haven't calculated a first payment date, fall back to the recurring cart's next payment date. - if ( 0 == $cart_item['subscription_switch']['first_payment_timestamp'] ) { - $cart_item['subscription_switch']['first_payment_timestamp'] = wcs_date_to_time( $recurring_cart->next_payment_date ); + if ( ! $subscription ) { + continue; + } + + /** + * One-time calculations + * + * Coupons, fees and shipping are calculated a single time for each recurring cart. + */ + + // If there are coupons in the cart, mark them for pending addition + $new_coupons = array(); + + foreach ( $recurring_cart->get_coupons() as $coupon_code => $coupon ) { + $coupon_item = new WC_Subscription_Item_Coupon_Pending_Switch( $coupon_code ); + $coupon_item->set_props( + array( + 'code' => $coupon_code, + 'discount' => $recurring_cart->get_coupon_discount_amount( $coupon_code ), + 'discount_tax' => $recurring_cart->get_coupon_discount_tax_amount( $coupon_code ), + ) + ); + + $coupon_data = $coupon->get_data(); + + // Avoid storing used_by - it's not needed and can get large. + unset( $coupon_data['used_by'] ); + + $coupon_item->add_meta_data( 'coupon_data', $coupon_data ); + $coupon_item->save(); + + do_action( 'woocommerce_checkout_create_order_coupon_item', $coupon_item, $coupon_code, $coupon, $subscription ); + + $subscription->add_item( $coupon_item ); + $new_coupons[] = $coupon_item->get_id(); + } + + $subscription->save(); + $switch_order_data[ $subscription->get_id() ]['coupons'] = $new_coupons; + + // If there are fees in the cart, mark them for pending addition + $new_fee_items = array(); + foreach ( $recurring_cart->get_fees() as $fee_key => $fee ) { + $fee_item = new WC_Subscription_Item_Fee_Pending_Switch(); + $fee_item->set_props( + array( + 'name' => $fee->name, + 'tax_status' => $fee->taxable, + 'amount' => $fee->amount, + 'total' => $fee->total, + 'tax' => $fee->tax, + 'tax_class' => $fee->tax_class, + 'tax_data' => $fee->tax_data, + ) + ); + + $fee_item->save(); + + do_action( 'woocommerce_checkout_create_order_fee_item', $fee_item, $fee_key, $fee, $subscription ); + + $subscription->add_item( $fee_item ); + $new_fee_items[] = $fee_item->get_id(); + } + + $subscription->save(); + $switch_order_data[ $subscription->get_id() ]['fee_items'] = $new_fee_items; + + if ( ! isset( $switch_order_data[ $subscription->get_id() ]['shipping_line_items'] ) ) { + // Add the shipping + // Keep a record of the current shipping line items so we can flip any new shipping items to a _pending_switch shipping item. + $current_shipping_line_items = array_keys( $subscription->get_shipping_methods() ); + $new_shipping_line_items = array(); + + // Keep a record of the subscription shipping total. Adding shipping methods will cause a new shipping total to be set, we'll need to set it back after. + $subscription_shipping_total = $subscription->get_total_shipping(); + + WC_Subscriptions_Checkout::add_shipping( $subscription, $recurring_cart ); + + // We must save the subscription, we need the Shipping method saved + // otherwise the ID is bogus (new:1) and we need it. + $subscription->save(); + + // Set all new shipping methods to shipping_pending_switch line items + foreach ( $subscription->get_shipping_methods() as $shipping_line_item_id => $shipping_meta ) { + if ( ! in_array( $shipping_line_item_id, $current_shipping_line_items ) ) { + wcs_update_order_item_type( $shipping_line_item_id, 'shipping_pending_switch', $subscription->get_id() ); + $new_shipping_line_items[] = $shipping_line_item_id; + } } - $is_different_billing_schedule = self::has_different_billing_schedule( $cart_item, $subscription ); - $is_different_payment_date = self::has_different_payment_date( $cart_item, $subscription ); - $is_different_length = self::has_different_length( $recurring_cart, $subscription ); - $is_single_item_subscription = self::is_single_item_subscription( $subscription ); + $subscription->set_shipping_total( $subscription_shipping_total ); + $switch_order_data[ $subscription->get_id() ]['shipping_line_items'] = $new_shipping_line_items; - $switched_item_data = array(); + // Loop through cart items to add them to the switched subscription. + foreach ( $recurring_cart->get_cart() as $cart_item_key => $cart_item ) { - if ( ! empty( $cart_item['subscription_switch']['item_id'] ) ) { - $existing_item = wcs_get_order_item( $cart_item['subscription_switch']['item_id'], $subscription ); - $switch_item = new WCS_Switch_Cart_Item( $cart_item, $subscription, $existing_item ); - $is_switch_with_matching_trials = $switch_item->is_switch_during_trial() && $switch_item->trial_periods_match(); - $switched_item_data['remove_line_item'] = $cart_item['subscription_switch']['item_id']; - $switched_item_data['switch_direction'] = $switch_item->get_switch_type(); - } + // If we haven't calculated a first payment date, fall back to the recurring cart's next payment date. + if ( 0 == $cart_item['subscription_switch']['first_payment_timestamp'] ) { + $cart_item['subscription_switch']['first_payment_timestamp'] = wcs_date_to_time( $recurring_cart->next_payment_date ); + } - // If the item is on the same schedule, we can just add it to the new subscription and remove the old item. - if ( $is_single_item_subscription || ( false === $is_different_billing_schedule && false === $is_different_payment_date && false === $is_different_length ) ) { + $is_different_billing_schedule = self::has_different_billing_schedule( $cart_item, $subscription ); + $is_different_payment_date = self::has_different_payment_date( $cart_item, $subscription ); + $is_different_length = self::has_different_length( $recurring_cart, $subscription ); + $is_single_item_subscription = self::is_single_item_subscription( $subscription ); - // Add the new item - if ( wcs_is_woocommerce_pre( '3.0' ) ) { - $item_id = WC_Subscriptions_Checkout::add_cart_item( $subscription, $cart_item, $cart_item_key ); - wcs_update_order_item_type( $item_id, 'line_item_pending_switch', $subscription->get_id() ); - } else { - $item = new WC_Order_Item_Pending_Switch; + $switched_item_data = array(); + + if ( ! empty( $cart_item['subscription_switch']['item_id'] ) ) { + $existing_item = wcs_get_order_item( $cart_item['subscription_switch']['item_id'], $subscription ); + $switch_item = new WCS_Switch_Cart_Item( $cart_item, $subscription, $existing_item ); + $is_switch_with_matching_trials = $switch_item->is_switch_during_trial() && $switch_item->trial_periods_match(); + $switched_item_data['remove_line_item'] = $cart_item['subscription_switch' ]['item_id']; + $switched_item_data['switch_direction'] = $switch_item->get_switch_type(); + } + + // If the item is on the same schedule, we can just add it to the new subscription and remove the old item. + if ( $is_single_item_subscription || ( false === $is_different_billing_schedule && false === $is_different_payment_date && false === $is_different_length ) ) { + // Add the new item + $item = new WC_Order_Item_Pending_Switch; $item->legacy_values = $cart_item; // @deprecated For legacy actions. $item->legacy_cart_item_key = $cart_item_key; // @deprecated For legacy actions. $item->set_props( array( @@ -976,8 +1070,8 @@ class WC_Subscriptions_Switcher { 'taxes' => $cart_item['line_tax_data'], ) ); - if ( ! empty( $cart_item['data'] ) ) { - $product = $cart_item['data']; + if ( ! empty( $cart_item[ 'data' ] ) ) { + $product = $cart_item[ 'data' ]; $item->set_props( array( 'name' => $product->get_name(), 'tax_class' => $product->get_tax_class(), @@ -997,147 +1091,63 @@ class WC_Subscriptions_Switcher { // The subscription is not saved automatically, we need to call 'save' because we added an item $subscription->save(); $item_id = $item->get_id(); + + $switched_item_data['add_line_item'] = $item_id; + + // Remove the item from the cart so that WC_Subscriptions_Checkout doesn't add it to a subscription + if ( 1 == count( WC()->cart->recurring_carts[ $recurring_cart_key ]->get_cart() ) ) { + // If this is the only item in the cart, clear out recurring carts so WC_Subscriptions_Checkout doesn't try to create an empty subscription + unset( WC()->cart->recurring_carts[ $recurring_cart_key ] ); + } else { + unset( WC()->cart->recurring_carts[ $recurring_cart_key ]->cart_contents[ $cart_item_key ] ); + } } - $switched_item_data['add_line_item'] = $item_id; + $switch_order_data[ $subscription->get_id() ]['switches'][ $cart_item['subscription_switch']['order_line_item_id'] ] = $switched_item_data; - // Remove the item from the cart so that WC_Subscriptions_Checkout doesn't add it to a subscription - if ( 1 == count( WC()->cart->recurring_carts[ $recurring_cart_key ]->get_cart() ) ) { - // If this is the only item in the cart, clear out recurring carts so WC_Subscriptions_Checkout doesn't try to create an empty subscription - unset( WC()->cart->recurring_carts[ $recurring_cart_key ] ); - } else { - unset( WC()->cart->recurring_carts[ $recurring_cart_key ]->cart_contents[ $cart_item_key ] ); + // If the old subscription has just one item, we can safely update its billing schedule + if ( $is_single_item_subscription ) { + + if ( $is_different_billing_schedule ) { + $switch_order_data[ $subscription->get_id() ]['billing_schedule']['_billing_period'] = WC_Subscriptions_Product::get_period( $cart_item['data'] ); + $switch_order_data[ $subscription->get_id() ]['billing_schedule']['_billing_interval'] = absint( WC_Subscriptions_Product::get_interval( $cart_item['data'] ) ); + } + + $updated_dates = array(); + + if ( '1' == WC_Subscriptions_Product::get_length( $cart_item['data'] ) || ( 0 != $recurring_cart->end_date && gmdate( 'Y-m-d H:i:s', $cart_item['subscription_switch']['first_payment_timestamp'] ) >= $recurring_cart->end_date ) ) { + // Delete the next payment date. + $updated_dates['next_payment'] = 0; + } else if ( $is_different_payment_date ) { + $updated_dates['next_payment'] = gmdate( 'Y-m-d H:i:s', $cart_item['subscription_switch']['first_payment_timestamp'] ); + } + + if ( $is_different_length ) { + $updated_dates['end'] = $recurring_cart->end_date; + } + + // If the switch should maintain the current trial or delete it. + if ( isset( $is_switch_with_matching_trials ) && $is_switch_with_matching_trials ) { + $updated_dates['trial_end'] = $subscription->get_date( 'trial_end' ); + } else { + $updated_dates['trial_end'] = 0; + } + + if ( ! empty( $updated_dates ) ) { + $subscription->validate_date_updates( $updated_dates ); + $switch_order_data[ $subscription->get_id() ]['dates']['update'] = $updated_dates; + } } } - - $switch_order_data[ $subscription->get_id() ]['switches'][ $cart_item['subscription_switch']['order_line_item_id'] ] = $switched_item_data; - - // If the old subscription has just one item, we can safely update its billing schedule - if ( $is_single_item_subscription ) { - - if ( $is_different_billing_schedule ) { - $switch_order_data[ $subscription->get_id() ]['billing_schedule']['_billing_period'] = WC_Subscriptions_Product::get_period( $cart_item['data'] ); - $switch_order_data[ $subscription->get_id() ]['billing_schedule']['_billing_interval'] = absint( WC_Subscriptions_Product::get_interval( $cart_item['data'] ) ); - } - - $updated_dates = array(); - - if ( '1' == WC_Subscriptions_Product::get_length( $cart_item['data'] ) || ( 0 != $recurring_cart->end_date && gmdate( 'Y-m-d H:i:s', $cart_item['subscription_switch']['first_payment_timestamp'] ) >= $recurring_cart->end_date ) ) { - // Delete the next payment date. - $updated_dates['next_payment'] = 0; - } else if ( $is_different_payment_date ) { - $updated_dates['next_payment'] = gmdate( 'Y-m-d H:i:s', $cart_item['subscription_switch']['first_payment_timestamp'] ); - } - - if ( $is_different_length ) { - $updated_dates['end'] = $recurring_cart->end_date; - } - - // If the switch should maintain the current trial or delete it. - if ( isset( $is_switch_with_matching_trials ) && $is_switch_with_matching_trials ) { - $updated_dates['trial_end'] = $subscription->get_date( 'trial_end' ); - } else { - $updated_dates['trial_end'] = 0; - } - - if ( ! empty( $updated_dates ) ) { - $subscription->validate_date_updates( $updated_dates ); - $switch_order_data[ $subscription->get_id() ]['dates']['update'] = $updated_dates; - } - } - - // If there are coupons in the cart, mark them for pending addition - $new_coupons = array(); - foreach ( $recurring_cart->get_coupons() as $coupon_code => $coupon ) { - $coupon_item = new WC_Subscription_Item_Coupon_Pending_Switch( $coupon_code ); - $coupon_item->set_props( - array( - 'code' => $coupon_code, - 'discount' => $recurring_cart->get_coupon_discount_amount( $coupon_code ), - 'discount_tax' => $recurring_cart->get_coupon_discount_tax_amount( $coupon_code ), - ) - ); - // Avoid storing used_by - it's not needed and can get large. - $coupon_data = $coupon->get_data(); - unset( $coupon_data['used_by'] ); - $coupon_item->add_meta_data( 'coupon_data', $coupon_data ); - - $coupon_item->save(); - do_action( 'woocommerce_checkout_create_order_coupon_item', $coupon_item, $coupon_code, $coupon, $subscription ); - $subscription->add_item( $coupon_item ); - - $new_coupons[] = $coupon_item->get_id(); - } - $subscription->save(); - $switch_order_data[ $subscription->get_id() ]['coupons'] = $new_coupons; - - // If there are fees in the cart, mark them for pending addition - $new_fee_items = array(); - foreach ( $recurring_cart->get_fees() as $fee_key => $fee ) { - $fee_item = new WC_Subscription_Item_Fee_Pending_Switch(); - $fee_item->set_props( - array( - 'name' => $fee->name, - 'tax_status' => $fee->taxable, - 'amount' => $fee->amount, - 'total' => $fee->total, - 'tax' => $fee->tax, - 'tax_class' => $fee->tax_class, - 'tax_data' => $fee->tax_data, - ) - ); - - $fee_item->save(); - do_action( 'woocommerce_checkout_create_order_fee_item', $fee_item, $fee_key, $fee, $subscription ); - $subscription->add_item( $fee_item ); - - $new_fee_items[] = $fee_item->get_id(); - } - $subscription->save(); - $switch_order_data[ $subscription->get_id() ]['fee_items'] = $new_fee_items; - - // Add the shipping - // Keep a record of the current shipping line items so we can flip any new shipping items to a _pending_switch shipping item. - $current_shipping_line_items = array_keys( $subscription->get_shipping_methods() ); - $new_shipping_line_items = array(); - - // Keep a record of the subscription shipping total. Adding shipping methods will cause a new shipping total to be set, we'll need to set it back after. - $subscription_shipping_total = $subscription->get_total_shipping(); - - WC_Subscriptions_Checkout::add_shipping( $subscription, $recurring_cart ); - - if ( ! wcs_is_woocommerce_pre( '3.0' ) ) { - // We must save the subscription, we need the Shipping method saved - // otherwise the ID is bogus (new:1) and we need it. - $subscription->save(); - } - - // Set all new shipping methods to shipping_pending_switch line items - foreach ( $subscription->get_shipping_methods() as $shipping_line_item_id => $shipping_meta ) { - - if ( ! in_array( $shipping_line_item_id, $current_shipping_line_items ) ) { - wcs_update_order_item_type( $shipping_line_item_id, 'shipping_pending_switch', $subscription->get_id() ); - $new_shipping_line_items[] = $shipping_line_item_id; - } - } - - if ( wcs_is_woocommerce_pre( '3.0' ) ) { - $subscription->set_total( $subscription_shipping_total, 'shipping' ); - } else { - $subscription->set_shipping_total( $subscription_shipping_total ); - } - - $switch_order_data[ $subscription->get_id() ]['shipping_line_items'] = $new_shipping_line_items; } } foreach ( $switch_order_data as $subscription_id => $switch_data ) { - // Cancel all the switch orders linked to the switched subscription(s) which haven't been completed yet - excluding this one. $switch_orders = wcs_get_switch_orders_for_subscription( $subscription_id ); foreach ( $switch_orders as $switch_order_id => $switch_order ) { - if ( wcs_get_objects_property( $order, 'id' ) !== $switch_order_id && in_array( $switch_order->get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_payment', array( 'pending', 'failed', 'on-hold' ), $switch_order ) ) ) { + if ( $order->get_id() !== $switch_order_id && in_array( $switch_order->get_status(), apply_filters( 'woocommerce_valid_order_statuses_for_payment', array( 'pending', 'failed', 'on-hold' ), $switch_order ) ) ) { // translators: %s: order number. $switch_order->update_status( 'cancelled', sprintf( __( 'Switch order cancelled due to a new switch order being created #%s.', 'woocommerce-subscriptions' ), $order->get_order_number() ) ); } @@ -1150,7 +1160,9 @@ class WC_Subscriptions_Switcher { } } catch ( Exception $e ) { // There was an error updating the subscription, delete pending switch order. - wp_delete_post( $order_id, true ); + if ( $order instanceof WC_Order ) { + $order->delete( true ); + } throw $e; } } @@ -1161,8 +1173,10 @@ class WC_Subscriptions_Switcher { * @param WC_Order $order The new order * @param WC_Subscription $subscription The original subscription * @param WC_Cart $recurring_cart A recurring cart + * @deprecated 4.8.0 */ public static function update_shipping_methods( $subscription, $recurring_cart ) { + wcs_deprecated_function( __METHOD__, '4.8.0', 'The use of this function is no longer recommended and will be removed in a future version.' ); // First, archive all the shipping methods foreach ( $subscription->get_shipping_methods() as $shipping_method_id => $shipping_method ) { @@ -1185,8 +1199,18 @@ class WC_Subscriptions_Switcher { * @param WC_Subscription $subscription The original subscription */ public static function maybe_update_subscription_address( $order, $subscription ) { - $subscription->set_address( array_diff_assoc( $order->get_address( 'billing' ), $subscription->get_address( 'billing' ) ), 'billing' ); - $subscription->set_address( array_diff_assoc( $order->get_address( 'shipping' ), $subscription->get_address( 'shipping' ) ), 'shipping' ); + $billing_address_changes = array_diff_assoc( $order->get_address( 'billing' ), $subscription->get_address( 'billing' ) ); + $shipping_address_changes = array_diff_assoc( $order->get_address( 'shipping' ), $subscription->get_address( 'shipping' ) ); + + if ( wcs_is_woocommerce_pre( '7.1' ) ) { + $subscription->set_address( $billing_address_changes, 'billing' ); + $subscription->set_address( $shipping_address_changes, 'shipping' ); + } else { + $subscription->set_billing_address( $billing_address_changes ); + $subscription->set_shipping_address( $shipping_address_changes ); + + $subscription->save(); + } } /** @@ -1334,11 +1358,11 @@ class WC_Subscriptions_Switcher { return $is_valid; } - if ( empty( $_GET['_wcsnonce'] ) || ! wp_verify_nonce( $_GET['_wcsnonce'], 'wcs_switch_request' ) ) { + if ( empty( $_GET['_wcsnonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wcsnonce'] ) ), 'wcs_switch_request' ) ) { return false; } - $subscription = wcs_get_subscription( $_GET['switch-subscription'] ); + $subscription = wcs_get_subscription( absint( $_GET['switch-subscription'] ) ); $item_id = absint( $_GET['item'] ); $item = wcs_get_order_item( $item_id, $subscription ); @@ -1415,7 +1439,7 @@ class WC_Subscriptions_Switcher { return $cart_item_data; } - $subscription = wcs_get_subscription( $_GET['switch-subscription'] ); + $subscription = wcs_get_subscription( absint( $_GET['switch-subscription'] ) ); // Requesting a switch for someone elses subscription if ( ! current_user_can( 'switch_shop_subscription', $subscription->get_id() ) ) { @@ -1676,9 +1700,28 @@ class WC_Subscriptions_Switcher { /** * Do not carry over switch related meta data to renewal orders. * + * @since 4.7.0 + * + * @see wc_subscriptions_renewal_order_data + * + * @param array $order_meta An order's meta data. + * + * @return array Filtered order meta data to be copied. + */ + public static function remove_renewal_order_meta( $order_meta ) { + unset( $order_meta['_subscription_switch'] ); + return $order_meta; + } + + /** + * Do not carry over switch related meta data to renewal orders. + * + * @deprecated 4.7.0 + * * @since 1.5.4 */ public static function remove_renewal_order_meta_query( $order_meta_query ) { + _deprecated_function( __METHOD__, '4.7.0', 'WC_Subscriptions_Switcher::remove_renewal_order_meta' ); $order_meta_query .= " AND `meta_key` NOT IN ('_subscription_switch')"; @@ -1693,7 +1736,7 @@ class WC_Subscriptions_Switcher { public static function addons_add_to_cart_url( $add_to_cart_url ) { if ( isset( $_GET['switch-subscription'] ) && false === strpos( $add_to_cart_url, 'switch-subscription' ) ) { - $add_to_cart_url = self::add_switch_query_args( $_GET['switch-subscription'], $_GET['item'], $add_to_cart_url ); + $add_to_cart_url = self::add_switch_query_args( absint( $_GET['switch-subscription'] ), absint( $_GET['item'] ), $add_to_cart_url ); } return $add_to_cart_url; @@ -2309,29 +2352,34 @@ class WC_Subscriptions_Switcher { * * @param WC_Abstract_Order[] $orders_to_display The list of related orders to display. * @param WC_Subscription[] $subscriptions The list of related subscriptions. - * @param WP_Post $post The order or subscription post being viewed. + * @param WC_Order $order The order or subscription post being viewed. * * @return $orders_to_display The orders/subscriptions to display in the meta box. */ - public static function display_switches_in_related_order_metabox( $orders_to_display, $subscriptions, $post ) { + public static function display_switches_in_related_order_metabox( $orders_to_display, $subscriptions, $order ) { + if ( $order instanceof WP_Post ) { + wcs_deprecated_argument( __METHOD__, '4.7.0', 'Passing a WP Post object is deprecated. This function now expects an Order or Subscription object.' ); + $order = wc_get_order( $order->ID ); + } + $switched_subscriptions = array(); // On the subscription page, just show related orders. - if ( wcs_is_subscription( $post->ID ) ) { + if ( wcs_is_subscription( $order ) ) { - foreach ( wcs_get_switch_orders_for_subscription( $post->ID ) as $order ) { - $order->update_meta_data( '_relationship', __( 'Switch Order', 'woocommerce-subscriptions' ) ); - $orders_to_display[] = $order; + foreach ( wcs_get_switch_orders_for_subscription( $order->get_id() ) as $switch_order ) { + $switch_order->update_meta_data( '_relationship', __( 'Switch Order', 'woocommerce-subscriptions' ) ); + $orders_to_display[] = $switch_order; } // Display the subscriptions which had item/s switched to this subscription by its parent order. - if ( ! empty( $post->post_parent ) ) { - $switched_subscriptions = wcs_get_subscriptions_for_switch_order( $post->post_parent ); + if ( ! empty( $order->post_parent ) ) { + $switched_subscriptions = wcs_get_subscriptions_for_switch_order( $order->get_parent_id() ); } - // On the Edit Order screen, show any subscriptions with items switched by this order. + // On the Edit Order screen, show any subscriptions with items switched by this order. } else { - $switched_subscriptions = wcs_get_subscriptions_for_switch_order( $post->ID ); + $switched_subscriptions = wcs_get_subscriptions_for_switch_order( $order ); } foreach ( $switched_subscriptions as $subscription ) { diff --git a/includes/switching/class-wcs-cart-switch.php b/includes/switching/class-wcs-cart-switch.php index 07ddebc..8b2e371 100644 --- a/includes/switching/class-wcs-cart-switch.php +++ b/includes/switching/class-wcs-cart-switch.php @@ -65,7 +65,7 @@ class WCS_Cart_Switch extends WCS_Cart_Renewal { } } - return $pay_url; + return $pay_url; // nosemgrep: audit.php.wp.security.xss.query-arg -- False positive. $pay_url is escaped in the template and escaping URLs should be done at the point of output or usage. } /** @@ -81,7 +81,7 @@ class WCS_Cart_Switch extends WCS_Cart_Renewal { if ( isset( $_GET['pay_for_order'] ) && isset( $_GET['key'] ) && isset( $wp->query_vars['order-pay'] ) && isset( $_GET['subscription_switch'] ) ) { // Pay for existing order - $order_key = $_GET['key']; + $order_key = sanitize_text_field( wp_unslash( $_GET['key'] ) ); $order_id = ( isset( $wp->query_vars['order-pay'] ) ) ? $wp->query_vars['order-pay'] : absint( $_GET['order_id'] ); $order = wc_get_order( $wp->query_vars['order-pay'] ); diff --git a/languages/woocommerce-subscriptions.pot b/languages/woocommerce-subscriptions.pot index 1aa6eb3..51333b2 100644 --- a/languages/woocommerce-subscriptions.pot +++ b/languages/woocommerce-subscriptions.pot @@ -1,17 +1,17 @@ -# Copyright (C) 2022 WooCommerce +# Copyright (C) 2023 WooCommerce # This file is distributed under the same license as the WooCommerce Subscriptions plugin. msgid "" msgstr "" -"Project-Id-Version: WooCommerce Subscriptions 4.6.0\n" +"Project-Id-Version: WooCommerce Subscriptions 5.2.0\n" "Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2022-10-11T04:47:59+00:00\n" +"POT-Creation-Date: 2023-07-05T05:07:01+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.6.0\n" +"X-Generator: WP-CLI 2.8.0\n" "X-Domain: woocommerce-subscriptions\n" #. Plugin Name of the plugin @@ -28,7 +28,7 @@ msgid "Sell products and services with recurring payments in your WooCommerce St msgstr "" #. Author of the plugin -#: includes/admin/class-wcs-admin-reports.php:101 +#: includes/admin/class-wcs-admin-reports.php:136 #: includes/admin/reports/class-wcs-report-cache-manager.php:262 msgid "WooCommerce" msgstr "" @@ -37,15 +37,25 @@ msgstr "" msgid "https://woocommerce.com/" msgstr "" -#: includes/admin/class-wcs-admin-reports.php:46 +#: includes/admin/class-wcs-admin-reports.php:58 +msgctxt "heading used in an admin notice" +msgid "WooCommerce Subscriptions - Reports Not Available" +msgstr "" + +#. translators: placeholders $1 and $2 are opening tags linking to the WooCommerce documentation on HPOS and data synchronization. Placeholder $3 is a closing link () tag. +#: includes/admin/class-wcs-admin-reports.php:61 +msgid "Subscription reports are incompatible with the %1$sWooCommerce data storage features%3$s enabled on your store. Please enable %2$stable synchronization%3$s if you wish to use subscription reports." +msgstr "" + +#: includes/admin/class-wcs-admin-reports.php:81 #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:917 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1011 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1163 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:56 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1030 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1182 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:59 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:38 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-wc-admin-manager.php:80 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:338 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:351 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:350 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:363 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-query.php:108 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-query.php:133 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-query.php:287 @@ -53,27 +63,27 @@ msgstr "" msgid "Subscriptions" msgstr "" -#: includes/admin/class-wcs-admin-reports.php:49 +#: includes/admin/class-wcs-admin-reports.php:84 msgid "Subscription Events by Date" msgstr "" -#: includes/admin/class-wcs-admin-reports.php:55 +#: includes/admin/class-wcs-admin-reports.php:90 msgid "Upcoming Recurring Revenue" msgstr "" -#: includes/admin/class-wcs-admin-reports.php:61 +#: includes/admin/class-wcs-admin-reports.php:96 msgid "Retention Rate" msgstr "" -#: includes/admin/class-wcs-admin-reports.php:67 +#: includes/admin/class-wcs-admin-reports.php:102 msgid "Subscriptions by Product" msgstr "" -#: includes/admin/class-wcs-admin-reports.php:73 +#: includes/admin/class-wcs-admin-reports.php:108 msgid "Subscriptions by Customer" msgstr "" -#: includes/admin/class-wcs-admin-reports.php:83 +#: includes/admin/class-wcs-admin-reports.php:118 msgid "Failed Payment Retries" msgstr "" @@ -87,15 +97,15 @@ msgid "Report Cache Enabled" msgstr "" #: includes/admin/reports/class-wcs-report-cache-manager.php:316 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1549 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1618 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:95 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1608 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1677 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:98 msgid "Yes" msgstr "" #: includes/admin/reports/class-wcs-report-cache-manager.php:316 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1549 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:95 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1608 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:98 msgid "No" msgstr "" @@ -453,7 +463,7 @@ msgstr "" #: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:776 #: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:195 #: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:209 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:19 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:20 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:23 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:47 msgid "Date" @@ -613,48 +623,50 @@ msgstr "" msgid "Renewals amount" msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:34 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:36 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:61 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-staging.php:56 msgid "staging" msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:34 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:36 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:61 msgid "live" msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:79 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:106 msgid "Subscriptions." msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:85 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:112 msgid "WCS debug constant." msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:91 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:118 msgid "Subscriptions Mode" msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:97 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:124 msgid "Subscriptions Live Site URL" msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:104 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:131 msgid "Subscriptions broken down by status." msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:113 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:140 msgid "Whether the Report Cache is enabled." msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:119 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:146 msgid "Number of report cache failures." msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:125 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:152 msgid "Subscriptions by Payment Gateway." msgstr "" -#: includes/api/class-wc-rest-subscription-system-status-manager.php:134 +#: includes/api/class-wc-rest-subscription-system-status-manager.php:161 msgid "Payment Gateway Feature Support." msgstr "" @@ -708,7 +720,7 @@ msgstr "" #: includes/api/class-wc-rest-subscriptions-controller.php:384 #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:350 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:508 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:506 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-extend-store-endpoint.php:175 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-extend-store-endpoint.php:449 msgid "The number of billing periods between subscription renewals." @@ -716,7 +728,7 @@ msgstr "" #: includes/api/class-wc-rest-subscriptions-controller.php:389 #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:355 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:513 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:511 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-extend-store-endpoint.php:168 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-extend-store-endpoint.php:442 msgid "Billing period for the subscription." @@ -724,7 +736,7 @@ msgstr "" #: includes/api/class-wc-rest-subscriptions-controller.php:395 #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:361 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:519 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:517 msgid "Subscription payment details." msgstr "" @@ -768,12 +780,12 @@ msgstr "" #. translators: 1$: gateway id, 2$: error message #: includes/api/class-wc-rest-subscriptions-controller.php:512 #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:336 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:407 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:405 msgid "Subscription payment method could not be set to %1$s with error message: %2$s" msgstr "" #: includes/api/legacy/class-wc-api-subscriptions.php:102 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:175 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:136 msgid "Invalid subscription status given." msgstr "" @@ -797,7 +809,7 @@ msgstr "" #: includes/api/legacy/class-wc-api-subscriptions.php:314 #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:306 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:369 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:367 msgid "Gateway does not support admin changing the payment method on a Subscription." msgstr "" @@ -807,12 +819,12 @@ msgid "Subscription payment method could not be set to %1$s and has been set to msgstr "" #: includes/api/legacy/class-wc-api-subscriptions.php:387 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:149 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:165 msgid "Invalid subscription billing interval given. Must be an integer greater than 0." msgstr "" #: includes/api/legacy/class-wc-api-subscriptions.php:398 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:144 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:160 msgid "Invalid subscription billing period given." msgstr "" @@ -833,34 +845,34 @@ msgstr "" #. translators: placeholder is an error message. #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:287 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:477 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:783 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:475 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:781 msgid "Updating subscription dates errored with message: %s" msgstr "" #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:366 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:524 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:522 msgid "Payment gateway ID." msgstr "" #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:373 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:531 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:529 msgid "The subscription's start date." msgstr "" #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:378 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:536 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:534 msgid "The subscription's trial date" msgstr "" #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:383 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:541 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:539 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-extend-store-endpoint.php:436 msgid "The subscription's next payment date." msgstr "" #: includes/api/legacy/class-wc-rest-subscriptions-controller.php:388 -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:546 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:544 msgid "The subscription's end date." msgstr "" @@ -868,130 +880,140 @@ msgstr "" msgid "Customer ID is invalid." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:502 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:500 msgid "The status to transition the subscription to. Unlike the \"status\" param, this will calculate and update the subscription dates." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:551 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:549 msgid "The subscription's original subscription ID if this is a resubscribed subscription." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:557 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:555 msgid "The subscription's resubscribed subscription ID." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:563 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:561 msgid "The date the subscription's latest order was completed, in GMT." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:569 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:567 msgid "The date the subscription's latest order was paid, in GMT." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:575 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:573 msgid "Removed line items data." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:582 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:580 msgid "Item ID." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:588 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:586 msgid "Product name." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:594 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:592 msgid "Product SKU." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:600 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:598 msgid "Product ID." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:605 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:603 msgid "Variation ID, if applicable." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:610 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:608 msgid "Quantity ordered." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:615 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:613 msgid "Tax class of product." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:621 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:619 msgid "Product price." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:627 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:625 msgid "Line subtotal (before discounts)." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:632 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:630 msgid "Line subtotal tax (before discounts)." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:637 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:635 msgid "Line total (after discounts)." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:642 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:640 msgid "Line total tax (after discounts)." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:647 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:645 msgid "Line taxes." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:655 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:653 msgid "Tax rate ID." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:661 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:659 msgid "Tax total." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:667 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:665 msgid "Tax subtotal." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:676 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:674 msgid "Removed line item meta data." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:684 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:682 msgid "Meta key." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:690 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:688 msgid "Meta label." msgstr "" -#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:696 +#: includes/api/v1/class-wc-rest-subscriptions-v1-controller.php:694 msgid "Meta value." msgstr "" +#. translators: 1$-2$: opening and closing tags, 3$-4$: link tags, takes to woocommerce plugin on wp.org, 5$-6$: opening and closing link tags, leads to plugins.php in admin +#: includes/class-wc-subscriptions-dependency-manager.php:149 +msgid "%1$sWooCommerce Subscriptions is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for WooCommerce Subscriptions to work. Please %5$sinstall & activate WooCommerce »%6$s" +msgstr "" + +#. translators: 1$-2$: opening and closing tags, 3$: minimum supported WooCommerce version, 4$-5$: opening and closing link tags, leads to plugin admin +#: includes/class-wc-subscriptions-dependency-manager.php:152 +msgid "%1$sWooCommerce Subscriptions is inactive.%2$s This version of Subscriptions requires WooCommerce %3$s or newer. Please %4$supdate WooCommerce to version %3$s or newer »%5$s" +msgstr "" + #. translators: 1-2: opening/closing tags, 3: Subscriptions version. -#: includes/class-wc-subscriptions-plugin.php:55 +#: includes/class-wc-subscriptions-plugin.php:58 msgid "%1$sWarning!%2$s We can see the %1$sWooCommerce Subscriptions Early Renewal%2$s plugin is active. Version %3$s of %1$sWooCommerce Subscriptions%2$s comes with that plugin's functionality packaged into the core plugin. Please deactivate WooCommerce Subscriptions Early Renewal to avoid any conflicts." msgstr "" -#: includes/class-wc-subscriptions-plugin.php:59 +#: includes/class-wc-subscriptions-plugin.php:62 msgid "Installed Plugins" msgstr "" #. translators: $1-$2: opening and closing tags, $3-$4: opening and closing tags. -#: includes/class-wc-subscriptions-plugin.php:196 +#: includes/class-wc-subscriptions-plugin.php:204 msgid "%1$sWooCommerce Subscriptions Installed%2$s – %3$sYou're ready to start selling subscriptions!%4$s" msgstr "" -#: includes/class-wc-subscriptions-plugin.php:214 +#: includes/class-wc-subscriptions-plugin.php:222 msgid "Add a Subscription Product" msgstr "" -#: includes/class-wc-subscriptions-plugin.php:215 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:514 +#: includes/class-wc-subscriptions-plugin.php:223 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:526 #: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php:35 #: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about.php:34 msgid "Settings" @@ -1025,7 +1047,7 @@ msgstr "" #: includes/class-wcs-call-to-action-button-text-manager.php:47 #: includes/class-wcs-call-to-action-button-text-manager.php:55 #: includes/class-wcs-call-to-action-button-text-manager.php:58 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:650 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:661 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php:1204 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php:1236 msgid "Sign up now" @@ -1053,7 +1075,7 @@ msgid "Set a maximum number of times a customer can suspend their account for ea msgstr "" #: includes/class-wcs-customer-suspension-manager.php:110 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:498 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1333 msgid "Suspend" msgstr "" @@ -1229,7 +1251,7 @@ msgid "That subscription does not exist. Has it been deleted?" msgstr "" #: includes/early-renewal/class-wcs-cart-early-renewal.php:104 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:233 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:232 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-resubscribe.php:78 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-resubscribe.php:129 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-user-change-status-handler.php:111 @@ -1258,7 +1280,7 @@ msgstr "" #: includes/early-renewal/wcs-early-renewal-functions.php:136 #: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-row.php:17 #: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-unknown-related-orders-row.php:18 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php:158 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php:170 #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:34 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:44 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-subscriptions.php:33 @@ -1305,12 +1327,12 @@ msgid "Renew early" msgstr "" #: includes/early-renewal/class-wcs-early-renewal-modal-handler.php:73 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:23 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:24 msgid "Payment:" msgstr "" #: includes/early-renewal/class-wcs-early-renewal-modal-handler.php:107 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:227 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:226 msgid "There was an error with your request. Please try again." msgstr "" @@ -1347,7 +1369,7 @@ msgstr "" #. translators: %d: subscription ID. #. translators: placeholder is a subscription ID. #: includes/gateways/class-wc-subscriptions-payment-gateways.php:77 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:167 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:192 msgid "Subscription doesn't exist in scheduled action: %d" msgstr "" @@ -1356,79 +1378,79 @@ msgstr "" msgid "Find new gateways that %1$ssupport automatic subscription payments%2$s in the official %3$sWooCommerce Marketplace%4$s." msgstr "" -#: includes/payment-retry/admin/class-wcs-retry-admin.php:46 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:59 msgid "Automatic Failed Payment Retries" msgstr "" #. translators: %d: retry count. -#: includes/payment-retry/admin/class-wcs-retry-admin.php:100 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:113 msgid "%d Pending Payment Retry" msgid_plural "%d Pending Payment Retries" msgstr[0] "" msgstr[1] "" #. translators: %d: retry count. -#: includes/payment-retry/admin/class-wcs-retry-admin.php:104 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:117 msgid "%d Processing Payment Retry" msgid_plural "%d Processing Payment Retries" msgstr[0] "" msgstr[1] "" #. translators: %d: retry count. -#: includes/payment-retry/admin/class-wcs-retry-admin.php:108 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:121 msgid "%d Failed Payment Retry" msgid_plural "%d Failed Payment Retries" msgstr[0] "" msgstr[1] "" #. translators: %d: retry count. -#: includes/payment-retry/admin/class-wcs-retry-admin.php:112 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:125 msgid "%d Successful Payment Retry" msgid_plural "%d Successful Payment Retries" msgstr[0] "" msgstr[1] "" #. translators: %d: retry count. -#: includes/payment-retry/admin/class-wcs-retry-admin.php:116 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:129 msgid "%d Cancelled Payment Retry" msgid_plural "%d Cancelled Payment Retries" msgstr[0] "" msgstr[1] "" -#: includes/payment-retry/admin/class-wcs-retry-admin.php:144 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:157 msgid "Retry Failed Payments" msgstr "" -#: includes/payment-retry/admin/class-wcs-retry-admin.php:145 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:158 msgid "Enable automatic retry of failed recurring payments" msgstr "" #. translators: 1,2: opening/closing link tags (to documentation). -#: includes/payment-retry/admin/class-wcs-retry-admin.php:150 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:163 msgid "Attempt to recover recurring revenue that would otherwise be lost due to payment methods being declined only temporarily. %1$sLearn more%2$s." msgstr "" -#: includes/payment-retry/admin/class-wcs-retry-admin.php:172 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:185 msgctxt "label for the system status page" msgid "Custom Retry Rules" msgstr "" -#: includes/payment-retry/admin/class-wcs-retry-admin.php:180 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:193 msgctxt "label for the system status page" msgid "Custom Retry Rule Class" msgstr "" -#: includes/payment-retry/admin/class-wcs-retry-admin.php:188 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:201 msgctxt "label for the system status page" msgid "Custom Raw Retry Rule" msgstr "" -#: includes/payment-retry/admin/class-wcs-retry-admin.php:196 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:209 msgctxt "label for the system status page" msgid "Custom Retry Rule" msgstr "" -#: includes/payment-retry/admin/class-wcs-retry-admin.php:204 +#: includes/payment-retry/admin/class-wcs-retry-admin.php:217 msgctxt "label for the system status page" msgid "Retries Migration Status" msgstr "" @@ -1480,32 +1502,32 @@ msgstr "" msgid "Unpublished" msgstr "" -#: includes/payment-retry/class-wcs-retry-manager.php:120 +#: includes/payment-retry/class-wcs-retry-manager.php:140 msgctxt "table heading" msgid "Renewal Payment Retry" msgstr "" -#: includes/payment-retry/class-wcs-retry-manager.php:230 +#: includes/payment-retry/class-wcs-retry-manager.php:250 msgctxt "used in order note as reason for why status changed" msgid "Retry rule applied:" msgstr "" -#: includes/payment-retry/class-wcs-retry-manager.php:268 +#: includes/payment-retry/class-wcs-retry-manager.php:288 msgctxt "used in order note as reason for why status changed" msgid "Retry rule reapplied:" msgstr "" -#: includes/payment-retry/class-wcs-retry-manager.php:324 +#: includes/payment-retry/class-wcs-retry-manager.php:344 msgctxt "used in order note as reason for why order status changed" msgid "Subscription renewal payment retry:" msgstr "" -#: includes/payment-retry/class-wcs-retry-manager.php:328 +#: includes/payment-retry/class-wcs-retry-manager.php:348 msgctxt "used in order note as reason for why subscription status changed" msgid "Subscription renewal payment retry:" msgstr "" -#: includes/payment-retry/class-wcs-retry-manager.php:344 +#: includes/payment-retry/class-wcs-retry-manager.php:364 msgid "Payment retry attempted on renewal order with multiple related subscriptions with no payment method in common." msgstr "" @@ -1536,8 +1558,8 @@ msgid "Add New Retry" msgstr "" #: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:40 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:138 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:229 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:156 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:254 msgid "Edit" msgstr "" @@ -1607,7 +1629,7 @@ msgid "Choose a new subscription." msgstr "" #: includes/switching/class-wc-subscriptions-switcher.php:245 -#: includes/switching/class-wc-subscriptions-switcher.php:1219 +#: includes/switching/class-wc-subscriptions-switcher.php:1243 msgid "Your cart contained an invalid subscription switch request. It has been removed." msgid_plural "Your cart contained invalid subscription switch requests. They have been removed." msgstr[0] "" @@ -1718,7 +1740,7 @@ msgstr "" #: includes/switching/class-wc-subscriptions-switcher.php:453 #: includes/switching/class-wc-subscriptions-switcher.php:555 -#: includes/switching/class-wc-subscriptions-switcher.php:2599 +#: includes/switching/class-wc-subscriptions-switcher.php:2647 msgid "Upgrade or Downgrade" msgstr "" @@ -1737,88 +1759,88 @@ msgid "Between Grouped Subscriptions" msgstr "" #. translators: %s: order number. -#: includes/switching/class-wc-subscriptions-switcher.php:1142 +#: includes/switching/class-wc-subscriptions-switcher.php:1152 msgid "Switch order cancelled due to a new switch order being created #%s." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1347 +#: includes/switching/class-wc-subscriptions-switcher.php:1371 msgid "You can only switch to a subscription product." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1353 +#: includes/switching/class-wc-subscriptions-switcher.php:1377 msgid "We can not find your old subscription item." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1375 +#: includes/switching/class-wc-subscriptions-switcher.php:1399 msgid "You can not switch to the same subscription." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1422 +#: includes/switching/class-wc-subscriptions-switcher.php:1446 msgid "You can not switch this subscription. It appears you do not own the subscription." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1463 +#: includes/switching/class-wc-subscriptions-switcher.php:1487 msgid "There was an error locating the switch details." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1825 +#: includes/switching/class-wc-subscriptions-switcher.php:1868 msgctxt "a switch type" msgid "Downgrade" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1828 +#: includes/switching/class-wc-subscriptions-switcher.php:1871 msgctxt "a switch type" msgid "Upgrade" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1831 +#: includes/switching/class-wc-subscriptions-switcher.php:1874 msgctxt "a switch type" msgid "Crossgrade" msgstr "" #. translators: %1: product subtotal, %2: HTML span tag, %3: direction (upgrade, downgrade, crossgrade), %4: closing HTML span tag -#: includes/switching/class-wc-subscriptions-switcher.php:1836 +#: includes/switching/class-wc-subscriptions-switcher.php:1879 msgctxt "product subtotal string" msgid "%1$s %2$s(%3$s)%4$s" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1952 +#: includes/switching/class-wc-subscriptions-switcher.php:1995 msgid "The original subscription item being switched cannot be found." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:1954 +#: includes/switching/class-wc-subscriptions-switcher.php:1997 msgid "The item on the switch order cannot be found." msgstr "" #. translators: 1$: old item, 2$: new item when switching -#: includes/switching/class-wc-subscriptions-switcher.php:1965 +#: includes/switching/class-wc-subscriptions-switcher.php:2008 msgctxt "used in order notes" msgid "Customer switched from: %1$s to %2$s." msgstr "" #. translators: %s: new item name. -#: includes/switching/class-wc-subscriptions-switcher.php:1968 +#: includes/switching/class-wc-subscriptions-switcher.php:2011 msgctxt "used in order notes" msgid "Customer added %s." msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:2323 -#: includes/switching/class-wc-subscriptions-switcher.php:2876 +#: includes/switching/class-wc-subscriptions-switcher.php:2371 +#: includes/switching/class-wc-subscriptions-switcher.php:2924 msgid "Switch Order" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:2338 -#: includes/switching/class-wc-subscriptions-switcher.php:2891 +#: includes/switching/class-wc-subscriptions-switcher.php:2386 +#: includes/switching/class-wc-subscriptions-switcher.php:2939 msgid "Switched Subscription" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:2556 +#: includes/switching/class-wc-subscriptions-switcher.php:2604 msgctxt "add to cart button text while switching a subscription" msgid "Switch subscription" msgstr "" -#: includes/switching/class-wc-subscriptions-switcher.php:2740 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:233 +#: includes/switching/class-wc-subscriptions-switcher.php:2788 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:224 msgctxt "Subscription status" msgid "Switched" msgstr "" @@ -1849,115 +1871,75 @@ msgstr "" msgid "Want to renew early via the checkout? Click %shere.%s" msgstr "" -#: tests/unit/scheduler/scheduler.php:65 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:300 -msgctxt "table heading" -msgid "Start Date" -msgstr "" - -#: tests/unit/scheduler/scheduler.php:66 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:301 -msgctxt "table heading" -msgid "Trial End" -msgstr "" - -#: tests/unit/scheduler/scheduler.php:67 -#: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:40 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:302 -msgctxt "table heading" -msgid "Next Payment" -msgstr "" - -#: tests/unit/scheduler/scheduler.php:68 -#: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:23 -#: vendor/woocommerce/subscriptions-core/templates/emails/expired-subscription.php:23 -#: vendor/woocommerce/subscriptions-core/templates/emails/on-hold-subscription.php:23 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:303 -msgctxt "table heading" -msgid "Last Order Date" -msgstr "" - -#: tests/unit/scheduler/scheduler.php:69 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:304 -msgctxt "table heading" -msgid "Cancelled Date" -msgstr "" - -#: tests/unit/scheduler/scheduler.php:70 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:305 -msgctxt "table heading" -msgid "End Date" -msgstr "" - #. translators: 1: relation type, 2: list of valid relation types. #: vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-related-order-store.php:148 msgid "Invalid relation type: %1$s. Order relationship type must be one of: %2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:208 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:211 msgid "Simple subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:209 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:212 msgid "Variable subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:230 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:233 msgid "Downloadable" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:231 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:234 msgid "Virtual" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:295 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:298 msgid "Choose the subscription price, billing interval and period." msgstr "" #. translators: placeholder is trial period validation message if passed an invalid value (e.g. "Trial period can not exceed 4 weeks") -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:297 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:300 msgctxt "Trial period field tooltip on Edit Product administration screen" msgid "An optional period of time to wait before charging the first recurring payment. Any sign up fee will still be charged at the outset of the subscription. %s" msgstr "" #. translators: %s: currency symbol. #. translators: placeholder is a currency symbol / code -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:311 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:314 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:44 msgid "Subscription price (%s)" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:315 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:318 msgctxt "example price" msgid "e.g. 5.90" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:316 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:319 msgid "Subscription interval" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:322 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:470 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:325 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:481 msgid "Subscription period" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:337 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:471 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:341 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:482 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:66 msgid "Expire after" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:340 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:344 msgid "Automatically expire the subscription after this length of time. This length is in addition to any free trial or amount of time provided before a synchronised first renewal date." msgstr "" #. translators: %s is a currency symbol / code -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:350 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:355 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:20 msgid "Sign-up fee (%s)" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:351 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:356 #: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php:31 #: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php:86 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:21 @@ -1966,90 +1948,90 @@ msgctxt "example price" msgid "e.g. 9.90" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:352 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:357 msgid "Optionally include an amount to be charged at the outset of the subscription. The sign-up fee will be charged immediately, even if the product has a free trial or the payment dates are synced." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:364 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2483 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:371 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2469 #: vendor/woocommerce/subscriptions-core/templates/admin/html-variation-price.php:25 msgid "Free trial" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:367 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:374 #: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php:115 msgid "Subscription Trial Period" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:405 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:414 msgid "One time shipping" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:406 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:415 msgid "Shipping for subscription products is normally charged on the initial order and all renewal orders. Enable this to only charge shipping once on the initial order. Note: for this setting to be enabled the subscription must not have a free trial or a synced renewal date." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:467 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:478 msgid "Subscription pricing" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:468 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:479 msgid "Subscription sign-up fee" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:469 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:480 msgid "Subscription billing interval" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:472 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:483 msgid "Free trial length" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:473 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:484 msgid "Free trial period" msgstr "" #. translators: %s: subscription status. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:798 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:810 msgid "Unable to change subscription status to \"%s\". Please assign a customer to the subscription to activate it." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:839 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:864 msgid "Trashing this order will also trash the subscriptions purchased with the order." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:852 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:877 msgid "Enter the new period, either day, week, month or year:" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:853 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:878 msgid "Enter a new length (e.g. 5):" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:854 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:879 msgid "Enter a new interval as a single number (e.g. to charge every 2nd month, enter 2):" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:855 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:880 msgid "Delete all variations without a subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:861 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:886 msgid "An error occurred determining if that variation can be deleted. Please try again." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:862 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:887 msgid "That variation can not be removed because it is associated with active subscriptions. To remove this variation, please cancel and delete the subscriptions for it." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:867 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:892 msgid "" "You are about to trash one or more orders which contain a subscription.\n" "\n" "Trashing the orders will also trash the subscriptions purchased with these orders." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:880 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:900 msgid "" "WARNING: Bad things are about to happen!\n" "\n" @@ -2058,306 +2040,325 @@ msgid "" "Changes to the billing period, recurring discount, recurring tax or recurring total may not be reflected in the amount charged by the payment gateway." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:881 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:901 msgid "You are deleting a subscription item. You will also need to manually cancel and trash the subscription on the Manage Subscriptions screen." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:888 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:908 msgid "" "Warning: Deleting a user will also delete the user's subscriptions. The user's orders will remain but be reassigned to the 'Guest' user.\n" "\n" "Do you want to continue to delete this user and any associated subscriptions?" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:892 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:912 msgid "PayPal Standard has a number of limitations and does not support all subscription features." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:892 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:912 msgid "Because of this, it is not recommended as a payment method for Subscriptions unless it is the only available option for your country." msgstr "" +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:915 +msgid "This action cannot be reversed. Are you sure you wish to erase personal data from the selected subscriptions?" +msgstr "" + #. translators: placeholders are for HTML tags. They are 1$: "

", 2$: "

", 3$: "

", 4$: "", 5$: "", 6$: "", 7$: "", 8$: "

" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:910 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:932 msgctxt "used in admin pointer script params in javascript as type pointer content" msgid "%1$sChoose Subscription%2$s%3$sThe WooCommerce Subscriptions extension adds two new subscription product types - %4$sSimple subscription%5$s and %6$sVariable subscription%7$s.%8$s" msgstr "" #. translators: placeholders are for HTML tags. They are 1$: "

", 2$: "

", 3$: "

", 4$: "

" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:912 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:934 msgctxt "used in admin pointer script params in javascript as price pointer content" msgid "%1$sSet a Price%2$s%3$sSubscription prices are a little different to other product prices. For a subscription, you can set a billing period, length, sign-up fee and free trial.%4$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:942 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:960 msgid "Active subscriber?" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:985 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1004 msgid "Manage Subscriptions" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:989 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:347 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1008 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:359 msgid "Search Subscriptions" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1209 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1234 msgctxt "options section heading" msgid "Miscellaneous" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1216 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1241 msgid "Mixed Checkout" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1217 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1242 msgid "Allow multiple subscriptions and products to be purchased simultaneously." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1221 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1246 msgid "Allow a subscription product to be purchased with other products and subscriptions in the same transaction." msgstr "" #. translators: placeholder is a number -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1322 +#. translators: placeholder is a subscription ID. +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1348 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1510 msgid "We can't find a subscription with ID #%d. Perhaps it was deleted?" msgstr "" #. translators: Placeholders are opening and closing link tags. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1366 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1423 msgid "We weren't able to locate the set of report results you requested. Please regenerate the link from the %1$sSubscription Reports screen%2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1420 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1478 msgid "We can't find a paid subscription order for this user." msgstr "" #. translators: placeholders are opening link tag, ID of sub, and closing link tag -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1452 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1457 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1517 msgid "Showing orders for %1$sSubscription %2$s%3$s" msgstr "" #. translators: number of 1$: days, 2$: weeks, 3$: months, 4$: years -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1481 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1540 msgid "The trial period can not exceed: %1$s, %2$s, %3$s or %4$s." msgstr "" #. translators: placeholder is a time period (e.g. "4 weeks") -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1486 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1545 msgid "The trial period can not exceed %s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1548 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:93 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1607 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:96 msgctxt "label that indicates whether debugging is turned on for the plugin" msgid "WCS_DEBUG" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1554 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:107 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1613 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:110 msgctxt "Live or Staging, Label on WooCommerce -> System Status page" msgid "Subscriptions Mode" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1555 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:109 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1614 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:112 msgctxt "refers to staging site" msgid "Staging" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1555 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:109 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1614 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:112 msgctxt "refers to live site" msgid "Live" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1585 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1644 msgid "Automatic Recurring Payments" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1618 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1677 msgid "Supports automatic renewal payments." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1716 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1775 msgid "Subscription items can no longer be edited." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1720 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1779 msgid "This subscription is no longer editable because the payment gateway does not allow modification of recurring amounts." msgstr "" #. translators: $1-2: opening and closing tags of a link that takes to Woo marketplace / Stripe product page -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1739 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1798 msgid "No payment gateways capable of processing automatic subscription payments are enabled. If you would like to process automatic payments, we recommend the %1$sfree Stripe extension%2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1746 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1805 msgid "Recurring Payments" msgstr "" #. translators: placeholders are opening and closing link tags -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1754 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1813 msgid "Payment gateways which don't support automatic recurring payments can be used to process %1$smanual subscription renewal payments%2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1874 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1933 msgid "Note that purchasing a subscription still requires an account." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1888 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1947 msgid "The product type can not be changed because this product is associated with subscriptions." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1942 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1943 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:2004 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:2005 msgid "Allow subscription customers to create an account during checkout" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:79 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:83 msgctxt "meta box title" msgid "Subscription Data" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:81 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:85 msgctxt "meta box title" msgid "Schedule" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:85 #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:89 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:103 msgid "Related Orders" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:129 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:166 msgid "Please enter a start date in the past." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:130 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:167 msgid "Please enter a date at least 2 minutes into the future." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:130 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:167 msgid "Please enter a date at least one hour into the future." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:131 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:168 msgid "Please enter a date after the trial end." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:132 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:133 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:169 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:170 msgid "Please enter a date after the start date." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:134 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:171 msgid "Please enter a date before the next payment." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:135 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:172 msgid "Please enter a date after the next payment." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:136 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:173 msgid "" "Are you sure you want to process a renewal?\n" "\n" "This will charge the customer and email them the renewal order (if emails are enabled)." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:150 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:189 msgid "" "Are you sure you want to retry payment for this renewal order?\n" "\n" "This will attempt to charge the customer and send renewal order emails (if emails are enabled)." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:183 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:220 msgid "Process renewal" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:187 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:224 msgid "Create pending renewal order" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:189 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:226 msgid "Create pending parent order" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:193 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:230 msgid "Retry Renewal Payment" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:206 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:243 msgid "Process renewal order action requested by admin." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:217 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:254 msgid "Create pending renewal order requested by admin action." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:259 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:296 msgid "Create pending parent order requested by admin action." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:290 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:327 msgid "Retry renewal payment action requested by admin." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:386 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:423 msgid "This order contains line items with prices above the current product price. To override the product's live price when the customer pays for this order, lock in the manual price increases." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:390 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:427 msgid "Lock manual price increases" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:214 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:235 msgid "Search for a product…" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:258 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:298 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:329 +msgctxt "an action on a subscription" +msgid "Move to Trash" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:307 +msgctxt "an action on a subscription" +msgid "Restore" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:308 +msgctxt "an action on a subscription" +msgid "Delete Permanently" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:326 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1721 msgctxt "an action on a subscription" msgid "Activate" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:259 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:327 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1722 msgctxt "an action on a subscription" msgid "Put on-hold" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:260 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:499 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1853 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:328 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1334 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1723 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1937 #: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:327 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:78 msgctxt "an action on a subscription" msgid "Cancel" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:338 -msgctxt "Used in order note. Reason why status changed." -msgid "Subscription status changed by bulk edit:" -msgstr "" - #. translators: placeholder is the number of subscriptions updated -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:394 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:416 msgid "%s subscription status changed." msgid_plural "%s subscription statuses changed." msgstr[0] "" msgstr[1] "" #. translators: 1$: is the number of subscriptions not updated, 2$: is the error message -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:401 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:435 msgid "%1$s subscription could not be updated: %2$s" msgid_plural "%1$s subscriptions could not be updated: %2$s" msgstr[0] "" msgstr[1] "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:425 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:20 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:463 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:21 #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:22 #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:37 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:24 @@ -2368,8 +2369,8 @@ msgstr[1] "" msgid "Status" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:426 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:339 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:464 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:351 #: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:21 #: vendor/woocommerce/subscriptions-core/templates/emails/expired-subscription.php:21 #: vendor/woocommerce/subscriptions-core/templates/emails/on-hold-subscription.php:21 @@ -2378,116 +2379,79 @@ msgstr "" msgid "Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:427 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:465 msgid "Items" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:428 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:466 #: vendor/woocommerce/subscriptions-core/build/index.js:11 #: vendor/woocommerce/subscriptions-core/build/index.js:17 msgid "Total" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:429 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:467 msgid "Start Date" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:430 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:468 msgid "Trial End" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:431 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:469 msgid "Next Payment" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:432 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:470 msgid "Last Order Date" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:433 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:471 msgid "End Date" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:434 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:472 msgctxt "number of orders linked to a subscription" msgid "Orders" msgstr "" #. translators: placeholder is a subscription ID. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:455 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:507 msgctxt "hash before subscription number" msgid "#%s" msgstr "" -#. Translators: Placeholder is a
HTML tag. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:461 +#. translators: Placeholder is a
HTML tag. +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:519 msgid "This subscription couldn't be loaded from the database. %s Click to learn more." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:497 -#: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:311 -msgid "Reactivate" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:500 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:515 -msgid "Trash" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:501 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:519 -msgid "Delete Permanently" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:513 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php:768 -msgid "Restore this item from the Trash" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:513 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php:769 -msgid "Restore" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:515 -msgid "Move this item to the Trash" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:519 -msgid "Delete this item permanently" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:525 -msgid "Cancel Now" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:553 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:557 msgctxt "meaning billing address" msgid "Billing:" msgstr "" #. translators: placeholder is customer's billing email -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:558 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:562 msgid "Email: %s" msgstr "" #. translators: placeholder is customer's billing phone number -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:563 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:567 msgid "Tel: %s" msgstr "" #. translators: $1: is opening link, $2: is subscription order number, $3: is closing link tag, $4: is user's name -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:591 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:597 msgctxt "Subscription title on admin table. (e.g.: #211 for John Doe)" msgid "%1$s#%2$s%3$s for %4$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:595 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:606 msgid "Show more details" msgstr "" #. translators: %d: item count. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:616 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:627 msgid "%d item" msgid_plural "%d items" msgstr[0] "" @@ -2495,164 +2459,217 @@ msgstr[1] "" #. translators: placeholder is the display name of a payment gateway a subscription was paid by #. translators: %s: payment method. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:635 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2026 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:646 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2048 msgid "Via %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:677 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:689 msgid "Y/m/d g:i:s A" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:680 -msgid "This date should be treated as an estimate only. The payment gateway for this subscription controls when payments are processed." +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:706 +msgid "Subscription payment overdue.
" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:933 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:936 -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:939 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:711 +msgid "This date should be treated as an estimate only. The payment gateway for this subscription controls when payments are processed.
" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1069 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1072 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1075 msgid "Subscription updated." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:934 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1070 msgid "Custom field updated." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:935 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1071 msgid "Custom field deleted." msgstr "" #. translators: placeholder is previous post title -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:938 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1074 msgctxt "used in post updated messages" msgid "Subscription restored to revision from %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:940 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1076 msgid "Subscription saved." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:941 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1077 msgid "Subscription submitted." msgstr "" #. translators: php date string -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:943 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1079 msgid "Subscription scheduled for: %1$s." msgstr "" #. translators: php date string -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:943 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1079 msgctxt "used in \"Subscription scheduled for \"" msgid "M j, Y @ G:i" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:944 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1080 msgid "Subscription draft updated." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:980 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1122 msgid "Any Payment Method" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:981 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1123 msgid "None" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:987 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2008 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1129 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2030 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-change-payment-method-admin.php:170 msgid "Manual Renewal" msgstr "" #. translators: 1: user display name 2: user ID 3: user email -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1133 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1288 msgid "%1$s (#%2$s – %3$s)" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1140 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:85 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1295 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:96 msgid "Search for a customer…" msgstr "" +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1332 +#: vendor/woocommerce/subscriptions-core/includes/wcs-user-functions.php:311 +msgid "Reactivate" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1335 +msgid "Trash" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1336 +msgid "Delete Permanently" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1355 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php:768 +msgid "Restore this item from the Trash" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1357 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-product.php:769 +msgid "Restore" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1362 +msgid "Move this item to the Trash" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1376 +msgid "Delete this item permanently" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1387 +msgid "Cancel Now" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1453 +msgctxt "Used in order note. Reason why status changed." +msgid "Subscription status changed by bulk edit:" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1571 +msgid "All" +msgstr "" + #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-product-import-export-manager.php:32 msgid "Subscription variations" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:57 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:60 msgid "This section shows any information about Subscriptions." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:61 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:64 msgid "Store Setup" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:62 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:65 msgid "This section shows general information about the store." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:66 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:69 msgid "Subscriptions by Payment Gateway" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:67 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:70 msgid "This section shows information about Subscription payment methods." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:71 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:74 msgid "Payment Gateway Support" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:72 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:75 msgid "This section shows information about payment gateway feature support." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:119 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:122 msgctxt "Live URL, Label on WooCommerce -> System Status page" msgid "Subscriptions Live URL" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:135 +msgctxt "Subscriptions-core Version, Label on WooCommerce -> System Status page" +msgid "Subscriptions-core Library Version" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:151 msgctxt "label for the system status page" msgid "Subscriptions Template Theme Overrides" msgstr "" #. translators: placeholders are opening/closing tags linking to documentation on outdated templates. -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:145 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:161 msgid "%1$sLearn how to update%2$s" msgstr "" #. translators: %1$s is the file version, %2$s is the core version -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:191 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:206 msgid "version %1$s is out of date. The core version is %2$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:212 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:227 msgctxt "label for the system status page" msgid "Subscription Statuses" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:233 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:248 msgctxt "label for the system status page" msgid "WooCommerce Account Connected" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:256 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:271 msgctxt "label for the system status page" msgid "Active Product Key" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:274 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:291 msgctxt "label for the system status page" msgid "Other" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:308 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:325 msgctxt "label for the system status page" msgid "PayPal Reference Transactions Enabled" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:336 +#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-system-status.php:353 msgctxt "label for the system status page" msgid "Country / State" msgstr "" @@ -2665,172 +2682,172 @@ msgstr "" msgid "Edit Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:77 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:97 msgctxt "relation to order" msgid "Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:82 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:102 msgctxt "relation to order" msgid "Initial Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:93 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:113 msgctxt "relation to order" msgid "Renewal Order" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:96 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:116 msgctxt "relation to order" msgid "Parent Order" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:99 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:119 msgctxt "relation to order" msgid "Resubscribed Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:99 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:119 msgctxt "relation to order" msgid "Resubscribe Order" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:102 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php:122 msgctxt "relation to order" msgid "Unknown Order Type" msgstr "" #. translators: placeholder is the ID of the subscription -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:48 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:54 msgctxt "edit subscription header" msgid "Subscription #%s details" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:52 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:60 msgid "General" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:55 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:63 msgid "Customer:" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:64 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:73 msgid "View other subscriptions →" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:69 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:78 msgid "Profile →" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:93 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:105 msgid "Subscription status:" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:110 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:123 msgid "Parent order: " msgstr "" #. translators: placeholder is an order number. -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:114 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:127 msgid "#%1$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:121 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:135 msgid "Parent order:" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:127 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:142 msgid "Select an order…" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:137 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:155 msgid "Billing" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:140 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:158 msgid "Load billing address" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:148 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:150 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:240 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:242 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:166 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:168 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:265 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:267 msgid "Address" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:150 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:168 msgid "No billing address set." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:170 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:188 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-change-payment-method-admin.php:39 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-change-payment-method-admin.php:52 msgid "Payment Method" msgstr "" #. translators: %s: gateway ID. -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:175 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:193 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-change-payment-method-admin.php:54 msgctxt "The gateway ID displayed on the Edit Subscriptions screen when editing payment method." msgid "Gateway ID: [%s]" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:212 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:237 msgid "Customer change payment method page →" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:214 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:239 msgid "Customer add payment method page →" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:228 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:253 #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-extend-store-endpoint.php:287 #: vendor/woocommerce/subscriptions-core/build/index.js:6 msgid "Shipping" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:231 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:256 msgid "Load shipping address" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:232 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:257 msgid "Copy billing address" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:242 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:267 msgid "No shipping address set." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:264 -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:294 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:289 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:325 msgid "Customer Provided Note" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:295 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:326 msgid "Customer's notes about the order" msgstr "" #. translators: %s: parent order number (linked to its details screen). -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:387 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:425 msgctxt "subscription note after linking to a parent order" msgid "Subscription linked to parent order %s via admin." msgstr "" #. translators: placeholder is error message from the payment gateway or subscriptions when updating the status -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:401 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:440 msgid "Error updating some information: %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:17 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:18 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:42 msgid "Order Number" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:18 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:19 msgid "Relationship" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:21 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:22 #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:24 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:25 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-subscriptions.php:24 @@ -2839,20 +2856,20 @@ msgctxt "table heading" msgid "Total" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:34 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:36 #: vendor/woocommerce/subscriptions-core/templates/admin/deprecated/html-variation-price.php:57 msgid "Billing Period" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:43 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:46 msgid "Recurring:" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:63 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:66 msgid "Timezone:" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:63 +#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-subscription-schedule.php:66 msgid "Error: unable to find timezone of your browser." msgstr "" @@ -2866,168 +2883,168 @@ msgid "Read more" msgstr "" #. translators: %s: subscription status. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:423 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:426 msgid "Unable to change subscription status to \"%s\"." msgstr "" #. translators: 1: subscription status, 2: error message. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:546 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:549 msgid "Unable to change subscription status to \"%1$s\". Exception: %2$s" msgstr "" #. translators: 1: old subscription status 2: new subscription status -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:576 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:579 msgid "Status changed from %1$s to %2$s." msgstr "" #. translators: %s: new order status -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:590 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:593 msgid "Status set to %s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:604 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:607 msgid "Error during subscription status transition." msgstr "" #. translators: placeholder is human time diff (e.g. "3 weeks") -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1201 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2303 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1223 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2387 msgid "In %s" msgstr "" #. translators: placeholder is human time diff (e.g. "3 weeks") -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1204 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1226 #: vendor/woocommerce/subscriptions-core/includes/wcs-formatting-functions.php:246 msgid "%s ago" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1211 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1233 msgid "Not yet ended" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1214 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1236 msgid "Not cancelled" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1219 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1241 msgctxt "original denotes there is no date to display" msgid "-" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1327 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1349 msgid "The creation date of a subscription can not be deleted, only updated." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1330 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1352 msgid "The start date of a subscription can not be deleted, only updated." msgstr "" #. translators: %s: date type (e.g. "trial_end"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1335 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1357 msgid "The %s date of a subscription can not be deleted. You must delete the order." msgstr "" #. translators: %d: subscription ID. #. translators: %d: order ID. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1344 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2449 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1366 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2471 msgid "Subscription #%d: " msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1758 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1780 msgid "Payment status marked complete." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1786 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1808 msgid "Payment failed." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1791 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1813 msgid "Subscription Cancelled: maximum number of failed payments reached." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1901 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1923 msgid "The \"all\" value for $order_type parameter is deprecated. It was a misnomer, as it did not return resubscribe orders. It was also inconsistent with order type values accepted by wcs_get_subscription_orders(). Use array( \"parent\", \"renewal\", \"switch\" ) to maintain previous behaviour, or \"any\" to receive all order types, including switch and resubscribe." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2105 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:825 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2127 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:829 msgid "Payment method meta must be an array." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2341 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2363 msgid "Invalid format. First parameter needs to be an array." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2345 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2367 msgid "Invalid data. First parameter was empty when passed to update_dates()." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2352 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2374 msgid "Invalid data. First parameter has a date that is not in the registered date types." msgstr "" #. translators: placeholder is date type (e.g. "end", "next_payment"...) -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2379 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2401 msgctxt "appears in an error message if date is wrong format" msgid "Invalid %s date. The date must be of the format: \"Y-m-d H:i:s\"." msgstr "" #. translators: %s: date type (e.g. "end"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2417 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2439 msgid "The %s date must occur after the cancellation date." msgstr "" #. translators: %s: date type (e.g. "end"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2423 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2445 msgid "The %s date must occur after the last payment date." msgstr "" #. translators: %s: date type (e.g. "end"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2428 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2450 msgid "The %s date must occur after the next payment date." msgstr "" #. translators: %s: date type (e.g. "end"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2434 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2456 msgid "The %s date must occur after the trial end date." msgstr "" #. translators: %s: date type (e.g. "next_payment"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2439 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2461 msgid "The %s date must occur after the start date." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2469 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:341 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2491 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:352 msgid "Backordered" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:64 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:63 msgid "Change address" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:106 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:105 msgid "Both the shipping address used for the subscription and your default shipping address for future purchases will be updated." msgstr "" #. translators: $1: address type (Shipping Address / Billing Address), $2: opening tag, $3: closing tag -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:119 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:118 msgid "Update the %1$s used for %2$sall%3$s future renewals of my active subscriptions" msgstr "" #. translators: %s: subscription ID. #. translators: %s: order number. #. translators: placeholder is a subscription ID. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:243 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:739 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:242 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:751 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-query.php:101 msgctxt "hash before order number" msgid "Subscription #%s" msgstr "" #. translators: %s: address type (eg. 'billing' or 'shipping'). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:249 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-addresses.php:248 msgctxt "change billing or shipping address" msgid "Change %s address" msgstr "" @@ -3049,28 +3066,28 @@ msgid "Your cart has been emptied of subscription products. Only one subscriptio msgstr "" #: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart-validator.php:128 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:1543 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:1529 msgid "That subscription product can not be added to your cart as it already contains a subscription renewal." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:493 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:483 msgid "Initial Shipment" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:932 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:922 msgid "Please enter a valid postcode/ZIP." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:1168 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:1167 msgid "Invalid recurring shipping method." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2219 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2205 msgid "now" msgstr "" #. translators: placeholder is a number of days. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2378 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2364 #: vendor/woocommerce/subscriptions-core/includes/wcs-time-functions.php:58 msgid "%s day" msgid_plural "%s days" @@ -3078,7 +3095,7 @@ msgstr[0] "" msgstr[1] "" #. translators: placeholder is a number of weeks. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2382 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2368 #: vendor/woocommerce/subscriptions-core/includes/wcs-time-functions.php:60 msgid "%s week" msgid_plural "%s weeks" @@ -3086,7 +3103,7 @@ msgstr[0] "" msgstr[1] "" #. translators: placeholder is a number of months. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2386 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2372 #: vendor/woocommerce/subscriptions-core/includes/wcs-time-functions.php:62 msgid "%s month" msgid_plural "%s months" @@ -3094,7 +3111,7 @@ msgstr[0] "" msgstr[1] "" #. translators: placeholder is a number of years. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2390 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2376 #: vendor/woocommerce/subscriptions-core/includes/wcs-time-functions.php:64 msgid "%s year" msgid_plural "%s years" @@ -3102,223 +3119,223 @@ msgstr[0] "" msgstr[1] "" #. translators: 1$: day of the week (e.g. "every Wednesday"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2412 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2398 msgid "every %1$s" msgstr "" #. translators: 1$: period, 2$: day of the week (e.g. "every 2nd week on Wednesday"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2416 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2402 msgid "every %1$s on %2$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2425 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2411 msgid "on the last day of each month" msgstr "" #. translators: 1$: day of the month (e.g. "23rd") (e.g. "every 23rd of each month"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2429 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2415 msgid "on the %1$s of each month" msgstr "" #. translators: 1$: interval (e.g. "3rd") (e.g. "on the last day of every 3rd month"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2437 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2423 msgid "on the last day of every %1$s month" msgstr "" #. translators: on the, 1$: day of every, 2$: month (e.g. "on the 23rd day of every 2nd month"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2443 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2429 msgid "on the %1$s day of every %2$s month" msgstr "" #. translators: on, 1$: , 2$: each year (e.g. "on March 15th each year"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2454 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2440 msgid "on %1$s %2$s each year" msgstr "" #. translators: 1$: month (e.g. "March"), 2$: day of the month (e.g. "23rd), 3$: interval year (r.g March 23rd every 2nd year"). -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2461 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2447 msgid "on %1$s %2$s every %3$s year" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2493 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2479 msgid "Sign up fee" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2503 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-cart.php:2489 msgid "Renews" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:161 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:160 msgid "Sorry, this subscription change payment method request is invalid and cannot be processed." msgstr "" #. translators: placeholder is next payment's date -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:185 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:184 msgid " Next payment is due %s." msgstr "" #. translators: placeholder is either empty or "Next payment is due..." -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:191 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:190 msgid "Choose a new payment method.%s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:230 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:229 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-template-loader.php:105 #: vendor/woocommerce/subscriptions-core/includes/wcs-helper-functions.php:286 msgid "Invalid Subscription." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:236 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:235 #: vendor/woocommerce/subscriptions-core/includes/class-wcs-query.php:243 msgid "The payment method can not be changed for that subscription." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:239 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:238 msgid "Invalid order." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:257 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:256 msgctxt "label on button, imperative" msgid "Change payment" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:259 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:258 msgctxt "label on button, imperative" msgid "Add payment" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:320 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:319 msgid "Payment method updated." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:320 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:319 msgid "Payment method added." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:360 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:362 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:372 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:374 msgid "Payment method updated for all your current subscriptions." msgstr "" #. translators: 1: old payment title, 2: new payment title. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:517 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:529 msgctxt "%1$s: old payment title, %2$s: new payment title" msgid "Payment method changed from \"%1$s\" to \"%2$s\" by the subscriber." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:528 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:540 msgid "An error occurred updating your subscription's payment method. Please contact us for assistance." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:536 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:548 msgid "%1$sError:%2$s %3$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:761 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:773 msgctxt "the page title of the change payment method form" msgid "Change payment method" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:763 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:775 msgctxt "the page title of the add payment method form" msgid "Add payment method" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:805 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-change-payment-gateway.php:817 msgid "Please log in to your account below to choose a new payment method for your subscription." msgstr "" #. translators: placeholder is an internal error number -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:203 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:385 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:208 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:396 msgid "Error %d: Unable to create subscription. Please try again." msgstr "" #. translators: placeholder is an internal error number -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:220 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:225 msgid "Error %d: Unable to add tax to subscription. Please try again." msgstr "" #. translators: placeholder is an internal error number -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:232 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:237 msgid "Error %d: Unable to create order. Please try again." msgstr "" #. Translators: Placeholders are opening and closing strong and link tags. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:514 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:525 msgid "Purchasing a subscription product requires an account. Please go to the %1$sMy Account%2$s page to login or register." msgstr "" #. Translators: Placeholders are opening and closing strong and link tags. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:517 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:528 msgid "Purchasing a subscription product requires an account. Please go to the %1$sMy Account%2$s page to login or contact us if you need assistance." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:320 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:332 msgid "No Subscriptions found" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:322 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:334 msgid "Subscriptions will appear here for you to view and manage once purchased by a customer." msgstr "" #. translators: placeholders are opening and closing link tags -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:324 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:336 msgid "%1$sLearn more about managing subscriptions »%2$s" msgstr "" #. translators: placeholders are opening and closing link tags -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:326 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:338 msgid "%1$sAdd a subscription product »%2$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:340 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:352 msgctxt "custom post type setting" msgid "Add Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:341 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:353 msgctxt "custom post type setting" msgid "Add New Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:342 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:354 msgctxt "custom post type setting" msgid "Edit" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:343 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:355 msgctxt "custom post type setting" msgid "Edit Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:344 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:356 msgctxt "custom post type setting" msgid "New Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:345 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:346 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:357 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:358 msgctxt "custom post type setting" msgid "View Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:349 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:361 msgctxt "custom post type setting" msgid "No Subscriptions found in trash" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:350 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:362 msgctxt "custom post type setting" msgid "Parent Subscriptions" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:353 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:365 msgid "This is where subscriptions are stored." msgstr "" #. translators: placeholder is a post count. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:411 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:423 msgctxt "post status label including post count" msgid "Active (%s)" msgid_plural "Active (%s)" @@ -3326,7 +3343,7 @@ msgstr[0] "" msgstr[1] "" #. translators: placeholder is a post count. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:413 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:425 msgctxt "post status label including post count" msgid "Switched (%s)" msgid_plural "Switched (%s)" @@ -3334,7 +3351,7 @@ msgstr[0] "" msgstr[1] "" #. translators: placeholder is a post count. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:415 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:427 msgctxt "post status label including post count" msgid "Expired (%s)" msgid_plural "Expired (%s)" @@ -3342,29 +3359,29 @@ msgstr[0] "" msgstr[1] "" #. translators: placeholder is a post count. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:417 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:429 msgctxt "post status label including post count" msgid "Pending Cancellation (%s)" msgid_plural "Pending Cancellation (%s)" msgstr[0] "" msgstr[1] "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:466 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:478 msgid "Variable Subscription" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:515 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:527 #: vendor/woocommerce/subscriptions-core/includes/upgrades/templates/wcs-about-2-0.php:36 msgctxt "short for documents" msgid "Docs" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:516 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:528 msgid "Support" msgstr "" #. translators: placeholders are opening and closing tags. Leads to docs on version 2 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:539 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php:551 msgid "Warning! Version 2.0 is a major update to the WooCommerce Subscriptions extension. Before updating, please create a backup, update all WooCommerce extensions and test all plugins, custom code and payment gateways with version 2.0 on a staging site. %1$sLearn more about the changes in version 2.0 »%2$s" msgstr "" @@ -3628,217 +3645,217 @@ msgstr "" msgid "Would you like to add a payment method now?" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:87 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1917 -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1935 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:112 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2001 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2019 msgctxt "used in order note as reason for why subscription status changed" msgid "Subscription renewal payment due:" msgstr "" #. translators: placeholder is an order note. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:124 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:149 msgid "Error: Unable to create renewal order with note \"%s\"" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:134 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:159 msgid "Manual renewal order awaiting customer payment." msgstr "" #. translators: $1: order number, $2: error message -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:306 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:342 msgid "Failed to activate subscription status for order #%1$s: %2$s" msgstr "" #. translators: $1: order number, $2: error message -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:334 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:370 msgid "Failed to update subscription status after order #%1$s was put on-hold: %2$s" msgstr "" #. translators: $1: order number, $2: error message -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:362 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:398 msgid "Failed to cancel subscription after order #%1$s was cancelled: %2$s" msgstr "" #. translators: $1: order number, $2: error message -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:390 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:426 msgid "Failed to set subscription as expired for order #%1$s: %2$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:416 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:452 msgid "Subscription sign up failed." msgstr "" #. translators: $1: order number, $2: error message -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:426 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:462 msgid "Failed to process failed payment on subscription for order #%1$s: %2$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:500 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:536 msgid "Error: Unable to create subscription. Please try again." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:522 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:558 msgid "Error: Unable to add product to created subscription. Please try again." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:567 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:603 msgid "Pending subscription created." msgstr "" #. Translators: 1: The subscription ID number. 2: The current user's username. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:913 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:997 msgid "The related subscription #%1$s has been deleted after the customer was deleted by %2$s." msgstr "" #. Translators: Placeholder is the subscription ID number. -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:916 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1000 msgid "The related subscription #%s has been deleted after the customer was deleted." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1062 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:230 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1146 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:221 msgctxt "Subscription status" msgid "Active" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1065 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:232 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1149 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:223 msgctxt "Subscription status" msgid "Cancelled" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1068 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:234 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1152 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:225 msgctxt "Subscription status" msgid "Expired" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1071 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:229 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1155 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:220 msgctxt "Subscription status" msgid "Pending" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1074 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1158 msgctxt "Subscription status" msgid "Failed" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1078 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1162 msgctxt "Subscription status" msgid "On-hold" msgstr "" #. translators: 1$: month number (e.g. "01"), 2$: month abbreviation (e.g. "Jan") -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1830 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1914 msgctxt "used in a select box" msgid "%1$s-%2$s" msgstr "" #. translators: all fields are full html nodes: 1$: month input, 2$: day input, 3$: year input, 4$: hour input, 5$: minute input. Change the order if you'd like -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1843 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1927 msgid "%1$s%2$s, %3$s @ %4$s : %5$s" msgstr "" #. translators: all fields are full html nodes: 1$: month input, 2$: day input, 3$: year input. Change the order if you'd like -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1847 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1931 msgid "%1$s%2$s, %3$s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1852 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:1936 msgid "Change" msgstr "" #. translators: placeholder is subscription ID -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2185 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2269 msgid "Failed sign-up for subscription %s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2276 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2360 msgid "Invalid security token, please reload the page and try again." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2280 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2364 msgid "Only store managers can edit payment dates." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2284 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2368 msgid "Please enter all date fields." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2309 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-manager.php:2393 msgid "Date Changed" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:345 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:334 msgid "Your subscription will be activated when payment clears." msgid_plural "Your subscriptions will be activated when payment clears." msgstr[0] "" msgstr[1] "" #. translators: placeholders are opening and closing link tags -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:352 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:341 msgid "View the status of your subscription in %1$syour account%2$s." msgid_plural "View the status of your subscriptions in %1$syour account%2$s." msgstr[0] "" msgstr[1] "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:415 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:404 msgid "Subscription Relationship" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:435 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:424 msgid "Renewal Order" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:437 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:426 msgid "Resubscribe Order" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:439 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:428 msgid "Parent Order" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:483 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:477 msgid "Payment completed on order after subscription was cancelled." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:720 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:713 msgid "All orders types" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:723 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:716 msgctxt "An order type" msgid "Original" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:724 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:717 msgctxt "An order type" msgid "Subscription Parent" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:725 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:718 msgctxt "An order type" msgid "Subscription Renewal" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:726 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:719 msgctxt "An order type" msgid "Subscription Resubscribe" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:727 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:720 msgctxt "An order type" msgid "Subscription Switch" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:728 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:721 msgctxt "An order type" msgid "Non-subscription" msgstr "" #. translators: $1: opening link tag, $2: order number, $3: closing link tag -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1031 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1024 msgid "Subscription cancelled for refunded order %1$s#%2$s%3$s." msgstr "" @@ -3941,11 +3958,11 @@ msgid "This variation can not be removed because it is associated with existing msgstr "" #. translators: placeholder is order ID -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php:161 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php:173 msgid "Order %s created to record renewal." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php:181 +#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-renewal-order.php:193 msgid "Subscription renewal orders cannot be cancelled." msgstr "" @@ -4052,62 +4069,62 @@ msgstr "" msgid "First payment: %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:79 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:77 msgid "Related order caching is now handled by %1$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:86 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:84 msgid "Customer subscription caching is now handled by %1$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:110 -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:240 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:108 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:238 msgid "Customer subscription caching is now handled by %1$s and %2$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:127 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:125 msgid "new related order methods in WCS_Related_Order_Store" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:225 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cached-data-manager.php:223 msgid "Weekly" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-initial-payment.php:65 -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:208 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:205 msgid "That doesn't appear to be your order." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:223 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:220 msgid "This order can no longer be paid because the corresponding subscription does not require payment at this time." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:244 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:241 msgid "Complete checkout to renew your subscription." msgstr "" #. translators: placeholder is an item name -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:327 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:324 msgid "The %s product has been deleted and can no longer be renewed. Please choose a new product or contact us for assistance." msgstr "" #. translators: %s is subscription's number -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:362 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:359 msgid "Subscription #%s has not been added to the cart." msgstr "" #. translators: %s is order's number -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:365 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:362 msgid "Order #%s has not been added to the cart." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:404 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:401 msgid "We couldn't find the original subscription for an item in your cart. The item was removed." msgid_plural "We couldn't find the original subscriptions for items in your cart. The items were removed." msgstr[0] "" msgstr[1] "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:411 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:408 msgid "We couldn't find the original renewal order for an item in your cart. The item was removed." msgid_plural "We couldn't find the original renewal orders for items in your cart. The items were removed." msgstr[0] "" @@ -4122,7 +4139,7 @@ msgctxt "Used in WooCommerce by removed item notification: \"_All linked subscri msgid "All linked subscription items were" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:1512 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-cart-renewal.php:1529 msgctxt "The place order button text while renewing a subscription" msgid "Renew subscription" msgstr "" @@ -4233,7 +4250,7 @@ msgid "Error saving Subscriptions endpoints: %1$sSubscriptions%2$s, %1$sView sub msgstr "" #. translators: %s: invalid type of update argument. -#: vendor/woocommerce/subscriptions-core/includes/class-wcs-post-meta-cache-manager.php:199 +#: vendor/woocommerce/subscriptions-core/includes/class-wcs-post-meta-cache-manager.php:200 msgid "Invalid update type: %s. Post update types supported are \"add\" or \"delete\". Updates are done on post meta directly." msgstr "" @@ -4388,38 +4405,69 @@ msgstr "" msgid "That subscription can not be changed to %s. Please contact us if you need assistance." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:56 +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:80 msgid "Generate Customer Subscription Cache" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:56 +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:80 msgid "This will generate the persistent cache for linking users with subscriptions. The caches will be generated overtime in the background (via Action Scheduler)." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:57 +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:81 msgid "Delete Customer Subscription Cache" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:57 +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:81 msgid "This will clear the persistent cache of all of subscriptions stored against users in your store. Expect slower performance of checkout, renewal and other subscription related functions after taking this action. The caches will be regenerated overtime as queries to find a given user's subscriptions are run." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:69 +#. translators: 1: subscription ID, 2: subscription status +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-orders-table-subscription-data-store.php:351 +msgid "Subscription %1$d cannot be restored from the trash: it has already been restored to status \"%2$s\"." +msgstr "" + +#. translators: 1: subscription ID, 2: subscription status +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-orders-table-subscription-data-store.php:369 +msgid "The previous status of subscription %1$d (\"%2$s\") is invalid. It has been restored to \"pending\" status instead." +msgstr "" + +#. translators: 1: subscription ID, 2: subscription status +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-orders-table-subscription-data-store.php:381 +msgid "The previous status of subscription %1$d (\"%2$s\") is invalid. It could not be restored." +msgstr "" + +#. translators: 1: subscription ID, 2: subscription status +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-orders-table-subscription-data-store.php:432 +msgid "Something went wrong when trying to restore subscription %d from the trash. It could not be restored." +msgstr "" + +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:108 msgid "Generate Related Order Cache" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:69 +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:108 msgid "This will generate the persistent cache of all renewal, switch, resubscribe and other order types for all subscriptions in your store. The caches will be generated overtime in the background (via Action Scheduler)." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:70 +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:109 msgid "Delete Related Order Cache" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:70 +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:109 msgid "This will clear the persistent cache of all renewal, switch, resubscribe and other order types for all subscriptions in your store. Expect slower performance of checkout, renewal and other subscription related functions after taking this action. The caches will be regenerated overtime as related order queries are run." msgstr "" +#. translators: %s: Order date +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-subscription-data-store-cpt.php:244 +msgid "Subscription – %s" +msgstr "" + +#. translators: %s: Order date +#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-subscription-data-store-cpt.php:244 +msgctxt "Order date parsed by DateTime::format" +msgid "M d, Y @ h:i A" +msgstr "" + #. translators: placeholder is Subscriptions version number. #: vendor/woocommerce/subscriptions-core/includes/deprecated/deprecation-handlers/class-wc-subscriptions-deprecation-handler.php:271 msgid "Warning! You are running version %s of WooCommerce Subscriptions plugin code but your database has been upgraded to Subscriptions version 2.0. This will cause major problems on your store." @@ -4746,15 +4794,15 @@ msgstr "" msgid "Warning! Your store cannot create subscriptions less than %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:220 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:223 msgid "Unable to find order for PayPal billing agreement." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:282 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:285 msgid "An error occurred, please try again or try an alternate form of payment." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:362 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:365 #: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php:208 #: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php:320 #: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-reference-transaction-api-request.php:336 @@ -4767,33 +4815,33 @@ msgid "#" msgstr "" #. translators: placeholders are PayPal API error code and PayPal API error message -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:386 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:389 msgid "PayPal API error: (%1$d) %2$s" msgstr "" #. translators: placeholder is PayPal transaction status message -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:391 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:394 msgid "PayPal Transaction Held: %s" msgstr "" #. translators: placeholder is PayPal transaction status message -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:403 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:406 msgid "PayPal payment declined: %s" msgstr "" #. translators: placeholder is a transaction ID. -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:407 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:410 msgid "PayPal payment approved (ID: %s)" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:460 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:469 msgid "" "Are you sure you want to change the payment method from PayPal standard?\n" "\n" "This will suspend the subscription at PayPal." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:626 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/class-wcs-paypal.php:649 msgctxt "used in User Agent data sent to PayPal to help identify where a payment came from" msgid "WooCommerce Subscriptions PayPal" msgstr "" @@ -4949,7 +4997,7 @@ msgstr "" msgid "IPN subscription payment failure." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-standard-ipn-handler.php:646 +#: vendor/woocommerce/subscriptions-core/includes/gateways/paypal/includes/class-wcs-paypal-standard-ipn-handler.php:650 msgid "Invalid PayPal IPN Payload: unable to find matching subscription." msgstr "" @@ -5040,12 +5088,12 @@ msgid "Browser User Agent" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy-exporters.php:83 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:281 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:272 msgid "Billing Address" msgstr "" #: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy-exporters.php:84 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:280 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:271 msgid "Shipping Address" msgstr "" @@ -5062,74 +5110,75 @@ msgstr "" msgid "Subscriptions Data" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:92 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:94 msgid "By using WooCommerce Subscriptions, you may be storing personal data and depending on which third-party payment processors you’re using to take subscription payments, you may be sharing personal data with external sources." msgstr "" #. translators: placeholders are opening and closing link tags, linking to additional privacy policy documentation. -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:94 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:96 msgid "What we collect and store" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:95 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:97 msgid "For the purposes of processing recurring subscription payments, we store the customer's name, billing address, shipping address, email address, phone number and credit card/payment details." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:96 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:98 msgid "What we share with others" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:97 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:99 msgid "What personal information your store shares with external sources depends on which third-party payment processor plugins you are using to collect subscription payments. We recommend that you consult with their privacy policies to inform this section of your privacy policy." msgstr "" #. translators: placeholders are opening and closing link tags, linking to additional privacy policy documentation. -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:99 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:101 msgid "If you are using PayPal Standard or PayPal Reference transactions please see the %1$sPayPal Privacy Policy%2$s for more details." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:109 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:114 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:360 msgid "Cancel and remove personal data" msgstr "" #. translators: %d: number of subscriptions affected. -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:176 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:210 msgid "Removed personal data from %d subscription." msgid_plural "Removed personal data from %d subscriptions." msgstr[0] "" msgstr[1] "" #. translators: placeholders are opening and closing tags. -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:195 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:229 msgid "%1$sNote:%2$s Orders which are related to subscriptions will not be included in the orders affected by these settings." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:215 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:249 msgid "account erasure request" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:221 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:255 msgid "Remove personal data from subscriptions" msgstr "" #. Translators: %s URL to erasure request screen. -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:223 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:257 msgid "When handling an %s, should personal data within subscriptions be retained or removed?" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:232 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:266 msgid "Retain ended subscriptions" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:233 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:267 msgid "Retain ended subscriptions and their related orders for a specified duration before anonymizing the personal data within them." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:236 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:270 msgid "N/A" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:277 +#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:311 msgid "Customers with a subscription are excluded from this setting." msgstr "" @@ -5900,48 +5949,46 @@ msgstr "" msgid "Invalid sort order type: %1$s. The $sort_order argument must be %2$s or %3$s." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:148 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:142 msgctxt "In wcs_copy_order_meta error message. Refers to origin and target order objects." msgid "Invalid data. Orders expected aren't orders." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:152 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:146 msgctxt "Refers to the type of the copy being performed: \"copy_order\", \"subscription\", \"renewal_order\", \"resubscribe_order\"" msgid "Invalid data. Type of copy is not a string." msgstr "" #. translators: placeholders are strftime() strings. -#. translators: Order date parsed by strftime -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:296 -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:158 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:249 msgctxt "Used in subscription post title. \"Subscription renewal order - \"" msgid "%b %d, %Y @ %I:%M %p" msgstr "" #. translators: placeholder is a date. -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:301 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:254 msgid "Subscription Renewal Order – %s" msgstr "" #. translators: placeholder is a date. -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:305 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:258 msgid "Resubscribe Order – %s" msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:324 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:277 msgid "$type passed to the function was not a string." msgstr "" #. translators: placeholder is an order type. -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:329 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:282 msgid "\"%s\" is not a valid new order type." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:519 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:542 msgid "Invalid data. No valid subscription / order was passed in." msgstr "" -#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:523 +#: vendor/woocommerce/subscriptions-core/includes/wcs-order-functions.php:546 msgid "Invalid data. No valid item id was passed in." msgstr "" @@ -6281,6 +6328,14 @@ msgctxt "table headings in notification email" msgid "Price" msgstr "" +#: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:23 +#: vendor/woocommerce/subscriptions-core/templates/emails/expired-subscription.php:23 +#: vendor/woocommerce/subscriptions-core/templates/emails/on-hold-subscription.php:23 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:294 +msgctxt "table heading" +msgid "Last Order Date" +msgstr "" + #: vendor/woocommerce/subscriptions-core/templates/emails/cancelled-subscription.php:24 msgctxt "table headings in notification email" msgid "End of Prepaid Term" @@ -6563,6 +6618,12 @@ msgstr "" msgid "ID" msgstr "" +#: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:40 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:293 +msgctxt "table heading" +msgid "Next Payment" +msgstr "" + #: vendor/woocommerce/subscriptions-core/templates/myaccount/my-subscriptions.php:46 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:53 #: vendor/woocommerce/subscriptions-core/templates/myaccount/related-subscriptions.php:42 @@ -6704,68 +6765,72 @@ msgstr "" msgid "Clear" msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:127 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:141 msgctxt "Error message while creating a subscription" msgid "Invalid created date. The date must be a string and of the format: \"Y-m-d H:i:s\"." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:129 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:145 msgctxt "Error message while creating a subscription" msgid "Subscription created date must be before current day." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:134 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:150 msgctxt "Error message while creating a subscription" msgid "Invalid date. The date must be a string and of the format: \"Y-m-d H:i:s\"." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:139 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:155 msgctxt "Error message while creating a subscription" msgid "Invalid subscription customer_id." msgstr "" -#. translators: placeholder is order date parsed by strftime -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:160 -msgctxt "The post title for the new subscription" -msgid "Subscription – %s" -msgstr "" - -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:231 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:222 msgctxt "Subscription status" msgid "On hold" msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:235 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:226 msgctxt "Subscription status" msgid "Pending Cancellation" msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:251 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:242 msgid "Can not get status name. Status is not a string." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:274 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:265 msgid "Can not get address type display name. Address type is not a string." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:340 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:291 +msgctxt "table heading" +msgid "Start Date" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:292 +msgctxt "table heading" +msgid "Trial End" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:295 +msgctxt "table heading" +msgid "Cancelled Date" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:296 +msgctxt "table heading" +msgid "End Date" +msgstr "" + +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:331 msgid "Date type is not a string." msgstr "" -#: vendor/woocommerce/subscriptions-core/wcs-functions.php:342 +#: vendor/woocommerce/subscriptions-core/wcs-functions.php:333 msgid "Date type can not be an empty string." msgstr "" -#. translators: 1$-2$: opening and closing tags, 3$-4$: link tags, takes to woocommerce plugin on wp.org, 5$-6$: opening and closing link tags, leads to plugins.php in admin -#: woocommerce-subscriptions.php:138 -msgid "%1$sWooCommerce Subscriptions is inactive.%2$s The %3$sWooCommerce plugin%4$s must be active for WooCommerce Subscriptions to work. Please %5$sinstall & activate WooCommerce »%6$s" -msgstr "" - -#. translators: 1$-2$: opening and closing tags, 3$: minimum supported WooCommerce version, 4$-5$: opening and closing link tags, leads to plugin admin -#: woocommerce-subscriptions.php:141 -msgid "%1$sWooCommerce Subscriptions is inactive.%2$s This version of Subscriptions requires WooCommerce %3$s or newer. Please %4$supdate WooCommerce to version %3$s or newer »%5$s" -msgstr "" - #: vendor/woocommerce/subscriptions-core/build/index.js:1 msgctxt "Used in recurring totals section in Cart. 2+ will need plural, 1 will need singular." msgid "day" diff --git a/vendor/autoload.php b/vendor/autoload.php index 903bd0d..c85f70a 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -2,6 +2,24 @@ // autoload.php @generated by Composer +if (PHP_VERSION_ID < 50600) { + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + trigger_error( + $err, + E_USER_ERROR + ); +} + require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit253f1c7df0eb4d6d594d9e32faa57a6a::getLoader(); +return ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d::getLoader(); diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index afef3fa..a72151c 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -42,6 +42,9 @@ namespace Composer\Autoload; */ class ClassLoader { + /** @var \Closure(string):void */ + private static $includeFile; + /** @var ?string */ private $vendorDir; @@ -106,6 +109,7 @@ class ClassLoader public function __construct($vendorDir = null) { $this->vendorDir = $vendorDir; + self::initializeIncludeClosure(); } /** @@ -425,7 +429,8 @@ class ClassLoader public function loadClass($class) { if ($file = $this->findFile($class)) { - includeFile($file); + $includeFile = self::$includeFile; + $includeFile($file); return true; } @@ -555,18 +560,26 @@ class ClassLoader return false; } -} -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - * @private - */ -function includeFile($file) -{ - include $file; + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } } diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index d50e0c9..51e734a 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -21,12 +21,14 @@ use Composer\Semver\VersionParser; * See also https://getcomposer.org/doc/07-runtime.md#installed-versions * * To require its presence, you can require `composer-runtime-api ^2.0` + * + * @final */ class InstalledVersions { /** * @var mixed[]|null - * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array}|array{}|null + * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array}|array{}|null */ private static $installed; @@ -37,7 +39,7 @@ class InstalledVersions /** * @var array[] - * @psalm-var array}> + * @psalm-var array}> */ private static $installedByVendor = array(); @@ -96,7 +98,7 @@ class InstalledVersions { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } @@ -117,7 +119,7 @@ class InstalledVersions */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints($constraint); + $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -241,7 +243,7 @@ class InstalledVersions /** * @return array - * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string} + * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} */ public static function getRootPackage() { @@ -255,7 +257,7 @@ class InstalledVersions * * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. * @return array[] - * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} + * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} */ public static function getRawData() { @@ -278,7 +280,7 @@ class InstalledVersions * Returns the raw data of all installed.php which are currently loaded for custom implementations * * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ public static function getAllRawData() { @@ -301,7 +303,7 @@ class InstalledVersions * @param array[] $data A vendor/composer/installed.php data set * @return void * - * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array} $data + * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $data */ public static function reload($data) { @@ -311,7 +313,7 @@ class InstalledVersions /** * @return array[] - * @psalm-return list}> + * @psalm-return list}> */ private static function getInstalled() { @@ -326,7 +328,9 @@ class InstalledVersions if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -338,12 +342,17 @@ class InstalledVersions // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; } else { self::$installed = array(); } } - $installed[] = self::$installed; + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } return $installed; } diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index db9b014..a27be98 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2,7 +2,7 @@ // autoload_classmap.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index b7fc012..15a2ff3 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -2,7 +2,7 @@ // autoload_namespaces.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 12ea9cc..e480e28 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -2,7 +2,7 @@ // autoload_psr4.php @generated by Composer -$vendorDir = dirname(dirname(__FILE__)); +$vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index f1b01a0..a28ebc4 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit253f1c7df0eb4d6d594d9e32faa57a6a +class ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d { private static $loader; @@ -24,31 +24,12 @@ class ComposerAutoloaderInit253f1c7df0eb4d6d594d9e32faa57a6a require __DIR__ . '/platform_check.php'; - spl_autoload_register(array('ComposerAutoloaderInit253f1c7df0eb4d6d594d9e32faa57a6a', 'loadClassLoader'), true, true); - self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit253f1c7df0eb4d6d594d9e32faa57a6a', 'loadClassLoader')); + spl_autoload_register(array('ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d', 'loadClassLoader'), true, true); + self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); + spl_autoload_unregister(array('ComposerAutoloaderInit33a9fa1eb707ddafd4d5a1bd7f21492d', 'loadClassLoader')); - $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); - if ($useStaticLoader) { - require __DIR__ . '/autoload_static.php'; - - call_user_func(\Composer\Autoload\ComposerStaticInit253f1c7df0eb4d6d594d9e32faa57a6a::getInitializer($loader)); - } else { - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - } + require __DIR__ . '/autoload_static.php'; + call_user_func(\Composer\Autoload\ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d::getInitializer($loader)); $loader->register(true); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index a97ea2e..de3e01f 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit253f1c7df0eb4d6d594d9e32faa57a6a +class ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d { public static $prefixLengthsPsr4 = array ( 'C' => @@ -129,9 +129,9 @@ class ComposerStaticInit253f1c7df0eb4d6d594d9e32faa57a6a public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit253f1c7df0eb4d6d594d9e32faa57a6a::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit253f1c7df0eb4d6d594d9e32faa57a6a::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit253f1c7df0eb4d6d594d9e32faa57a6a::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit33a9fa1eb707ddafd4d5a1bd7f21492d::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 01d4bd2..e33ebeb 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -156,17 +156,17 @@ }, { "name": "woocommerce/subscriptions-core", - "version": "2.3.0", - "version_normalized": "2.3.0.0", + "version": "5.8.0", + "version_normalized": "5.8.0.0", "source": { "type": "git", "url": "https://github.com/Automattic/woocommerce-subscriptions-core.git", - "reference": "8017438f8e0cfc16494344f783fb134f77284d58" + "reference": "24db3cf51eb191edb21e79421387072194b59046" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/8017438f8e0cfc16494344f783fb134f77284d58", - "reference": "8017438f8e0cfc16494344f783fb134f77284d58", + "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/24db3cf51eb191edb21e79421387072194b59046", + "reference": "24db3cf51eb191edb21e79421387072194b59046", "shasum": "" }, "require": { @@ -179,7 +179,7 @@ "woocommerce/woocommerce-sniffs": "0.1.0", "yoast/phpunit-polyfills": "1.0.3" }, - "time": "2022-10-07T03:45:34+00:00", + "time": "2023-07-05T04:17:20+00:00", "type": "wordpress-plugin", "extra": { "phpcodesniffer-search-depth": 2 @@ -209,7 +209,7 @@ "description": "Sell products and services with recurring payments in your WooCommerce Store.", "homepage": "https://github.com/Automattic/woocommerce-subscriptions-core", "support": { - "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/2.3.0", + "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/5.8.0", "issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues" }, "install-path": "../woocommerce/subscriptions-core" diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 96e5cc5..b6512e6 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,22 +1,22 @@ array( + 'name' => 'woocommerce/woocommerce-subscriptions', 'pretty_version' => 'dev-trunk', 'version' => 'dev-trunk', + 'reference' => '3654b75b4e4dc6fc0a87c6424910937660919214', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '1b8773fe15dd9d70a59bfde2d5593191398b6096', - 'name' => 'woocommerce/woocommerce-subscriptions', 'dev' => false, ), 'versions' => array( 'composer/installers' => array( 'pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', + 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/./installers', 'aliases' => array(), - 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19', 'dev_requirement' => false, ), 'roundcube/plugin-installer' => array( @@ -32,21 +32,21 @@ ), ), 'woocommerce/subscriptions-core' => array( - 'pretty_version' => '2.3.0', - 'version' => '2.3.0.0', + 'pretty_version' => '5.8.0', + 'version' => '5.8.0.0', + 'reference' => '24db3cf51eb191edb21e79421387072194b59046', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../woocommerce/subscriptions-core', 'aliases' => array(), - 'reference' => '8017438f8e0cfc16494344f783fb134f77284d58', 'dev_requirement' => false, ), 'woocommerce/woocommerce-subscriptions' => array( 'pretty_version' => 'dev-trunk', 'version' => 'dev-trunk', + 'reference' => '3654b75b4e4dc6fc0a87c6424910937660919214', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '1b8773fe15dd9d70a59bfde2d5593191398b6096', 'dev_requirement' => false, ), ), diff --git a/vendor/woocommerce/subscriptions-core/assets/css/admin.css b/vendor/woocommerce/subscriptions-core/assets/css/admin.css index 3e9a2eb..3918c76 100644 --- a/vendor/woocommerce/subscriptions-core/assets/css/admin.css +++ b/vendor/woocommerce/subscriptions-core/assets/css/admin.css @@ -17,33 +17,51 @@ } /* Subscriptions Admin Page */ +.woocommerce_page_wc-orders--shop_subscription .tablenav input, +.woocommerce_page_wc-orders--shop_subscription .tablenav select, .post-type-shop_subscription .tablenav input, .post-type-shop_subscription .tablenav select { height: 32px; } +.woocommerce_page_wc-orders--shop_subscription .tablenav .select2-container, .post-type-shop_subscription .tablenav .select2-container { width: 240px !important; font-size: 14px; vertical-align: middle; margin: 1px 6px 4px 1px; } +.woocommerce_page_wc-orders--shop_subscription + .tablenav + .select2-selection--single, .post-type-shop_subscription .tablenav .select2-selection--single { height: 32px; } +.woocommerce_page_wc-orders--shop_subscription + .tablenav + .select2-selection__rendered, .post-type-shop_subscription .tablenav .select2-selection__rendered { line-height: 29px; } +.woocommerce_page_wc-orders--shop_subscription + .tablenav + .select2-selection__arrow, .post-type-shop_subscription .tablenav .select2-selection__arrow { height: 30px; } +.woocommerce_page_wc-orders--shop_subscription .wp-list-table, .post-type-shop_subscription .wp-list-table { margin-top: 1em; } +.woocommerce_page_wc-orders--shop_subscription .widefat .column-status, +.woocommerce_page_wc-orders--shop_subscription .widefat .column-order_title, .post-type-shop_subscription .widefat .column-status, .post-type-shop_subscription .widefat .column-order_title { width: 160px; text-align: left; } +.wcs-payment-overdue { + color: #d63539; +} /* Product List table */ table.wp-list-table span.product-type.variable-subscription { background-position: -48px 0; @@ -726,6 +744,14 @@ table.wc_gateways .renewals .tips { } /* Hide irrelevant sections on Edit Subscription screen */ +body.woocommerce_page_wc-orders--shop_subscription + .order_actions + #actions + optgroup[label='Resend order emails'], +body.woocommerce_page_wc-orders--shop_subscription .add-items .description.tips, +body.woocommerce_page_wc-orders--shop_subscription + .add-items + .button.refund-items, body.post-type-shop_subscription .order_actions #actions @@ -746,20 +772,33 @@ body.post-type-shop_subscription .add-items .button.refund-items { width: 19%; } + .woocommerce_page_wc-orders--shop_subscription + .wp-list-table + .column-status, .post-type-shop_subscription .wp-list-table .column-status { display: none; text-align: left; padding-bottom: 0; } + .woocommerce_page_wc-orders--shop_subscription + .wp-list-table + .column-status + mark, .post-type-shop_subscription .wp-list-table .column-status mark { margin: 0; } + .woocommerce_page_wc-orders--shop_subscription + .wp-list-table + .column-status::before, .post-type-shop_subscription .wp-list-table .column-status::before { display: none !important; } + .woocommerce_page_wc-orders--shop_subscription + .wp-list-table + .column-orders, .post-type-shop_subscription .wp-list-table .column-orders { text-align: left !important; } diff --git a/vendor/woocommerce/subscriptions-core/assets/js/admin/admin.js b/vendor/woocommerce/subscriptions-core/assets/js/admin/admin.js index 21ca486..69f55ea 100644 --- a/vendor/woocommerce/subscriptions-core/assets/js/admin/admin.js +++ b/vendor/woocommerce/subscriptions-core/assets/js/admin/admin.js @@ -1370,4 +1370,16 @@ jQuery( function ( $ ) { }, }; wcs_accounts_and_privacy_settings.init(); + + $( '#wpbody' ).on( 'click', '#doaction, #doaction2', function () { + var action = $( this ).is( '#doaction' ) + ? $( '#bulk-action-selector-top' ).val() + : $( '#bulk-action-selector-bottom' ).val(); + + if ( 'wcs_remove_personal_data' === action ) { + return window.confirm( + WCSubscriptions.i18n_remove_personal_data_notice + ); + } + } ); } ); diff --git a/vendor/woocommerce/subscriptions-core/assets/js/admin/meta-boxes-subscription.js b/vendor/woocommerce/subscriptions-core/assets/js/admin/meta-boxes-subscription.js index 4b68461..95a5cbf 100644 --- a/vendor/woocommerce/subscriptions-core/assets/js/admin/meta-boxes-subscription.js +++ b/vendor/woocommerce/subscriptions-core/assets/js/admin/meta-boxes-subscription.js @@ -327,11 +327,11 @@ jQuery( function ( $ ) { return false; } - $( 'body.post-type-shop_subscription #post' ).on( 'submit', function () { + $( 'body.post-type-shop_subscription #post, body.woocommerce_page_wc-orders--shop_subscription #order' ).on( 'submit', function () { if ( 'wcs_process_renewal' == $( - "body.post-type-shop_subscription select[name='wc_order_action']" + 'body.post-type-shop_subscription select[name="wc_order_action"], body.woocommerce_page_wc-orders--shop_subscription select[name="wc_order_action"]' ).val() ) { return confirm( @@ -340,7 +340,7 @@ jQuery( function ( $ ) { } } ); - $( 'body.post-type-shop_subscription #post' ).on( 'submit', function () { + $( 'body.post-type-shop_subscription #post, body.woocommerce_page_wc-orders--shop_subscription #order' ).on( 'submit', function () { if ( typeof wcs_admin_meta_boxes.change_payment_method_warning != 'undefined' && diff --git a/vendor/woocommerce/subscriptions-core/changelog.txt b/vendor/woocommerce/subscriptions-core/changelog.txt index 488f648..75545ae 100644 --- a/vendor/woocommerce/subscriptions-core/changelog.txt +++ b/vendor/woocommerce/subscriptions-core/changelog.txt @@ -1,5 +1,146 @@ *** WooCommerce Subscriptions Core Changelog *** += 5.8.0 - 2023-07-05 = +* Fix - When HPOS is enabled, permanently deleting a subscription related order wasn't updating the related orders cache properly. +* Fix - Added logic to check if the recurring cart array is present before displaying the recurring totals section in the cart. + += 5.7.2 - 2023-06-05 = +* Fix - Resolved an issue with customers being redirected to an incorrect Pay for Order URL after login. + += 5.7.1 - 2023-05-11 = +* Dev - Resolve errors for third-party code using the URLs returned from WC_Subscriptions_Admin::add_subscription_url() and WCS_Cart_Renewal::get_checkout_payment_url() because they were erroneously escaped. #440 +* Dev - Enable third-party code to alter the delete payment token URL returned from flag_subscription_payment_token_deletions. #440 + += 5.7.0 - 2023-05-04 = +* Fix - Fatal error from third-party extensions using the `woocommerce_update_order` expecting the second parameter. +* Dev - Pass the subscription object as the second parameter to `woocommerce_update_subscription` hook (and `woocommerce_update_order` for backwards compatibility). +* Dev - Return a response from the WC_Subscription::set_status() function in line with the parent WC_Order::set_status() function. +* Dev - Add the 'wcs_recurring_shipping_package_rates_match_standard_rates' filter to enable third-parties to override whether the subscription packages match during checkout validation. + += 5.6.0 - 2023-04-19 = +* Fix - Correctly determine subscription free shipping eligibility when the initial payment cart isn't eligible. Fixes erroneous "Invalid recurring shipping method" errors on checkout. #409 +* Dev - Fixed precision loss notice that occurs when running PHP 8.1. #428 +* Dev - Fix phpcs and semgrep warnings to improve code quality. #429 +* Dev - Use `wp_safe_redirect()` when processing a payment method change request. #429 + += 5.5.0 - 2023-03-10 = +* Fix - When HPOS is enabled, changing your address while paying for a renewal order will update the address on the subscription. #413 +* Fix - Prevent admin error notices being shown for the "subscription trial end" event that was caused by no callbacks being attached to this scheduled action. #414 +* Fix - Prevent fatal error when copying the `_shipping_address` meta data where the value is not an array. #417 + += 5.4.0 - 2023-02-21 = +* Fix - Remove the recurring shipping method cache that caused bugs for third-party plugins like Conditional Shipping and Payments. #407 + += 5.3.1 - 2023-02-01 = +* Fix - Fatal error when loading the Edit Subscription page with custom admin billing or shipping fields. #403 + += 5.3.0 - 2023-01-26 = +* Add - Highlight subscriptions with overdue payment in list view with red icon & tooltip. +* Fix - Shipping address correctly set when resubscribing or switching subscriptions that contain different billing and shipping addresses. +* Fix - When processing customer requests to update all their subscription payment methods, ensure the updated subscription is used fetch the new payment meta, not and old instance. +* Dev - Remove deprecated `strptime` function in favour of `DateTime::createFromFormat`. +* Fix - Catch exceptions when changing payment method associated with a subscription to avoid fatal errors. + += 5.2.0 - 2023-01-23 = +* Add - New wcs_set_order_address() helper function to set an array of address fields on an order or subscription. +* Fix - Edit, add, and list Subscription admin pages now work when HPOS is enabled. +* Fix - Fixed issues where multiple subscription purchases wouldn't appear on the My Account > Subscriptions screen, on HPOS environments. +* Fix - Refactor `WCS_Meta_Box_Subscription_Data::save` to support HPOS stores, fixing a PHP warning notice when updating an order via the Edit Order screen. +* Fix - Set the `download_permissions_granted` value when purchasing a downloadable subscription product when HPOS is enabled. +* Fix - When a customer changes their address on their account or subscription, make sure the new address is saved when HPOS is enabled. +* Fix - Removed the potential for an infinite loop when getting a subscription's related orders while the subscription is being loaded. +* Fix - Refactor `WC_Subscriptions_Renewal_Order::get_failed_order_replaced_by()` to support HPOS stores. +* Fix - Refactor the `WC_Subscriptions_Tracker` class to support HPOS stores. +* Fix - "Subscriptions by Payment Gateway" in WooCommerce → Status now shows the correct values when HPOS is enabled. +* Fix - Check whether the order actually exists before accessing order properties in wcs_order_contains_subscription() +* Fix - Replace the get_posts() used in get_subscriptions_from_token() to support HPOS stores. +* Fix - On HPOS stores, when a subscription's parent order is trashed or deleted, make sure the related subscription is also trashed or deleted. +* Fix - On HPOS stores, when a subscription is trashed or deleted, make sure it is cancelled first. +* Fix - Merge any custom meta_query args passed to wcs_get_orders_with_meta_query() to avoid overriding WC core args that map onto meta_query. +* Fix - Filtering the Subscriptions List Table by customer, product ID and payment method, now works on stores with HPOS enabled. +* Fix - Prevent erroneously resyncing a subscription every time it is loaded from the database on HPOS environments. +* Fix - Fix "Trying to get property 'ID' of non-object" errors on the edit subscription screen when HPOS is enabled. +* Fix - When HPOS is enabled, clicking the related orders link on the Subscriptions Table now filters the table with the related orders (previously all orders were shown). +* Fix - On HPOS environments, ensure subscription related order caches are updated when relationship order meta (eg `_subscription_renewal` or `_subscription_switch`) is updated. +* Fix - Show subscription status filters/views above the subscriptions list table on stores with HPOS enabled. +* Fix - Reorder the edit subscription meta boxes on HPOS environments so the line items meta box appears after the subscription data. +* Fix - On HPOS environments, prepopulate the subscription start date when creating a new subscription via the admin edit screen. +* Fix - On HPOS environments, handle the admin subscriptions list table bulk actions and row actions in a HPOS compatible way. +* Fix - On HPOS environments, admin notices might show incorrect subscription or order link as part of the admin notice. +* Fix - On HPOS environments, parent order link on subscription edit page, in subscription details box, is incorrect. +* Fix - On HPOS environments, update cache when subscription is trashed, deleted, or restored / untrashed. +* Fix - Replace code using wp_count_posts( 'shop_subscription' ) with data store function to count subscriptions grouped by statuses on stores with HPOS enabled. +* Dev - Replace code using get_post_type( $subscription_id ) with WC Data Store get_order_type(). +* Dev - Add subscriptions-core library version to the WooCommerce system status report. +* Dev - Introduced a WCS_Object_Data_Cache_Manager and WCS_Object_Data_Cache_Manager_Many_To_One class as HPOS equivalents of the WCS_Post_Meta_Cache_Manager classes. +* Dev - Introduced a new `untrash_order()` in the `WCS_Orders_Table_Subscription_Data_Store` class to fix untrashing subscriptions on stores that have HPOS enabled. +* Dev - Moved the trash, untrash & delete related `add_actions()` in the `WC_Subscriptions_Manager` class to be added on the `woocommerce_loaded` action. +* Dev - Update `wp_delete_post()` code that was used to delete a subscription to use CRUD methods to support HPOS. +* Dev - Fix phpcs violations in the `WC_Subscriptions_Tracker` class to improve code quality. +* Dev - Fix phpcs violations in the `WCS_Admin_System_Status` class to improve code quality. + += 5.1.0 - 2022-11-24 = +* Fix - Set payment tokens when copying data between orders and subscriptions in a CRUD compatible way. Fixes PHP notices during renewal order process. +* Fix - Infinite loop that can occur with `WCS_Orders_Table_Subscription_Data_Store::read_multiple()` on HPOS-enabled stores. +* Fix - On HPOS stores, when querying for subscriptions with wcs_get_orders_with_meta_query() with status 'any', ensure that wc_get_orders() queries for subscription statuses. +* Fix - On HPOS stores, when saving a subscription make sure subscription properties (ie `_requires_manual_renewal`) are saved to the database. +* Fix - On HPOS stores, when a subscription is loaded from the database, make sure all core subscription properties are read directly from meta. +* Fix - When viewing My Account > Subscriptions, fix an issue where no subscriptions were listed when HPOS is enabled. +* Fix - On HPOS stores, ensure payment tokens are copied from the subscription to the renewal order. +* Fix - Refactor `WCS_Meta_Box_Schedule::save` to support HPOS stores, fixing a PHP warning notice when updating an order via the Edit Order screen. +* Fix - Return a fresh instance of the renewal order after creating it. Fixes caching issues on HPOS sites where the returned order has no line items. +* Fix - Processing a manual renewal order with HPOS and data syncing enabled correctly saves the related order cache metadata on the subscription and prevents the post and order meta data getting out of sync. +* Fix - Use supported CRUD apis to determine if subscriptions are present on store (`wcs_do_subscriptions_exist`) +* Fix - With HPOS and data syncing enabled, updating the status of a pending manual renewal order to a paid status correctly activates the related subscription. +* Update - Refactor the `wcs_is_subscription` helper function to support HPOS. +* Update - Refactor our Related Orders data store classes (WCS_Related_Order_Store_Cached_CPT and WCS_Related_Order_Store_CPT) to use CRUD methods to support subscriptions and orders stored in HPOS. +* Update - Display related orders table when viewing the new "Edit Order" page (HPOS enabled stores). +* Fix - On HPOS stores, make sure the links in the related-orders table redirect to the new Edit Order URL. +* Dev - Removed the deprecated "wcs_subscriptions_for_{$relation_type}_order" dynamic hook used to filter the list of related subscriptions for the given relation type. The following hooks have been removed with no alternative: + wcs_subscriptions_for_renewal_order + wcs_subscriptions_for_switch_order + wcs_subscriptions_for_resubscribe_order +* Dev - Introduce a WC_Subscription::set_status() function to handle subscriptions set with a draft or auto-draft status. Replaces the need for the overriding WC_Subscription::get_status() which has been deleted. +* Dev - Manual renewal orders created with HPOS and data syncing enabled are properly linked to the subscription by its `_subscription_renewal` meta and backfilled to posts table. + += 5.0.0 - 2022-11-14 = +* Dev - The library has been bumped to version to 5.0.0 to reduce confusion with the version of WooCommerce Subscriptions. +* Dev - Usage of \WC_Subscriptions_Core_Plugin::get_plugin_version() is no longer recommended for version detection. \WC_Subscriptions_Core_Plugin::get_library_version() should be used instead. +* Add - New wcs_get_orders_with_meta_query() helper function to query for orders and subscriptions. +* Update - Replace instances of `get_posts()` across codebase with new wcs_get_orders_with_meta_query() function. +* Dev - Code that was tagged with a version and moved from WooCommerce Subscriptions now explicitly mentions this and shows the correct subscriptions-core and WC Subscriptions versions. +* Dev - Refactor the saving of subscription dates in the subscription datastore to separate fetching changes and saving. Enables backfilling subscription dates when HPOS syncing is enabled. + += 2.5.2 - 2022-11-15 = +* Fix - When creating a subscription via the checkout, make sure a new instance of the subscription is attached to the `woocommerce_checkout_subscription_created` action hook. + += 2.5.1 - 2022-11-04 = +* Dev - Replace the use of the deprecated wcs_renewal_order_meta hook with wc_subscription_renewal_order_data in the WCS_Related_Order_Store_Cached_CPT class. +* Dev - Fix typo in deprecation notice for the 'wcs_{type}_meta_query' filter. Incorrect replacement hook. + += 2.5.0 - 2022-11-04 = +* Add - New WCS_Orders_Table_Subscription_Data_Store class to support subscriptions stored in High-Performance Order Storage (HPOS). +* Add - New WCS_Orders_Table_Data_Store_Controller class to load the proper subscriptions data store when the store has HPOS enabled. +* Add - New data copier class to copy data to subscriptions and related orders in place of direct database queries in prepraration for HPOS support. +* Fix - When saving sync meta data on a new subscription, use 'woocommerce_new_subscription' instead of 'save_post'. This is to prevent errors when purchasing a subscription on stores that have HPOS enabled. +* Update - Improve maybe_add_subscription_meta() and subscription_contains_synced_product() inside our WC_Subscriptions_Synchroniser class to use CRUD methods. +* Dev - wcs_get_objects_property and wcs_set_objects_property have been marked as deprecated. Getters/Setters should be used on the objects instead. +* Dev - Deprecated the "wcs_{type}_meta_query" dynamic hook used to alter the database query used to fetch the meta data to copy between subscriptions and renewal orders. There is no direct replacement. Third-parties should use the "wc_subscriptions_{type}_data" or "wc_subscriptions_object_data" hooks instead. +* Dev - Deprecated the "wcs_{type}_meta" dynamic hook used to filter data copied to subscriptions and renewal orders. Third-parties should use wc_subscriptions_{type}_data instead. + wcs_subscription_meta -> wc_subscriptions_subscription_data + wcs_parent_meta -> wc_subscriptions_parent_data + wcs_resubscribe_order_meta -> wc_subscriptions_resubscribe_order_data + wcs_renewal_order_meta -> wc_subscriptions_renewal_order_data + += 2.4.1 - 2022-11-02 = +* Fix - Undefined method WC_Order::set_shipping_address() on stores running pre-7.1 of WooCommerce which prevented subscriptions from being purchased. + += 2.4.0 - 2022-10-28 = +* Update - The subscription creation function `wcs_create_subscription` has been updated to use WooCommerce CRUD methods in preparation for supporting High Performance Order Storage (HPOS). +* Update - Improve wcs_copy_order_address() to use modern APIs for setting address fields. +* Dev - woocommerce_new_subscription_data hook will only work with CPT datastore and so has been deprecated. +* Dev - i18n usage of strftime has been deprecated for subscription titles. Date is now formatted using woocommerce standard date formatting. + = 2.3.0 - 2022-10-07 = * Fix - Move One Time Shipping metabox fields to use the woocommerce_product_options_shipping_product_data hook introduced in WC 6.0. * Dev - Define build tool version requirements for consistent development and build environments. diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-repairer.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-repairer.php index 40c1f75..9d38d04 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-repairer.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-repairer.php @@ -7,7 +7,7 @@ * @author WooCommerce * @category Admin * @package WooCommerce Subscriptions/Admin/Upgrades - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 */ // Exit if accessed directly @@ -32,7 +32,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Attaches callbacks to hooks. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 * @see WCS_Background_Updater::init() for additional hooks and callbacks. */ public function init() { @@ -46,7 +46,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { * * Sets the page to 1. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 */ public function schedule_repair() { $this->set_page( 1 ); @@ -56,7 +56,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Gets a batch of items which need to be repaired. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 * @return array An array of items which need to be repaired. */ protected function get_items_to_update() { @@ -82,7 +82,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Runs the update and save any items which didn't get processed. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 */ public function run_update() { parent::run_update(); @@ -94,7 +94,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Schedules the repair event for this item. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 */ protected function update_item( $item ) { // Schedule the individual repair actions to run in 1 hr to give us the best chance at scheduling all the actions before they start running and clogging up the queue. @@ -105,7 +105,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Gets the current page number. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 * @return int */ protected function get_page() { @@ -115,7 +115,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Sets the current page number. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 * @param int $page. */ protected function set_page( $page ) { @@ -125,7 +125,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Gets items from the last request which weren't processed. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 * @return array */ protected function get_unprocessed_items() { @@ -135,7 +135,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Saves any items which haven't been handled. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 */ protected function save_unprocessed_items() { if ( ! empty( $this->items_to_repair ) ) { @@ -147,7 +147,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { /** * Deletes any items stored in the unprocessed cache stored in an option. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 */ protected function clear_unprocessed_items_cache() { delete_option( "{$this->repair_hook}_unprocessed" ); @@ -158,7 +158,7 @@ abstract class WCS_Background_Repairer extends WCS_Background_Upgrader { * * This function is called when there are no longer any items to update. * - * @since 2.6.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0 */ protected function unschedule_background_updates() { parent::unschedule_background_updates(); diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-updater.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-updater.php index c0ec55b..1641995 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-updater.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-updater.php @@ -8,8 +8,8 @@ * @author Prospress * @category Admin * @package WooCommerce Subscriptions/Admin - * @version 2.3 - * @since 2.3 + * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.3 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.3 */ if ( ! defined( 'ABSPATH' ) ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-upgrader.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-upgrader.php index f816ea0..af84fdd 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-upgrader.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-background-upgrader.php @@ -7,7 +7,7 @@ * @author Prospress * @category Admin * @package WooCommerce Subscriptions/Admin/Upgrades - * @since 2.3 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.3 */ // Exit if accessed directly @@ -33,7 +33,7 @@ abstract class WCS_Background_Upgrader extends WCS_Background_Updater { * Schedule the @see $this->scheduled_hook action to start repairing subscriptions in * @see $this->time_limit seconds (60 seconds by default). * - * @since 2.3.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.3.0 */ public function schedule_repair() { $this->schedule_background_update(); @@ -43,7 +43,7 @@ abstract class WCS_Background_Upgrader extends WCS_Background_Updater { * Add a message to the wcs-upgrade-subscriptions-paypal-suspended log * * @param string $message The message to be logged - * @since 2.3.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.3.0 */ protected function log( $message ) { $this->logger->add( $this->log_handle, $message ); diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-cache-manager.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-cache-manager.php index c5fa842..de5fd0f 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-cache-manager.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-cache-manager.php @@ -5,7 +5,7 @@ * Implements methods to deal with the soft caching layer * * @class WCS_Cache_Manager - * @version 2.0 + * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 * @package WooCommerce Subscriptions/Classes * @category Class * @author Gabor Javorszky diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-customer-store.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-customer-store.php index 12caee9..d28490d 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-customer-store.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-customer-store.php @@ -13,8 +13,8 @@ if ( ! defined( 'ABSPATH' ) ) { * it is being moved to use the 'post_author' column of the posts table from WC v2.4 or v2.5. It * will eventually also be moved quite likely to custom tables. * - * @version 2.3.0 - * @since 2.3.0 + * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.3.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.3.0 * @category Class * @author Prospress */ diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-debug-tool-cache-updater.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-debug-tool-cache-updater.php index 9ebea36..4461cc2 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-debug-tool-cache-updater.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-debug-tool-cache-updater.php @@ -8,8 +8,8 @@ * @author Prospress * @category Admin * @package WooCommerce Subscriptions/Admin - * @version 2.3 - * @since 2.3 + * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.3 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.3 */ if ( ! defined( 'ABSPATH' ) ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-debug-tool.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-debug-tool.php index cf32dce..b179b37 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-debug-tool.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-debug-tool.php @@ -8,8 +8,8 @@ * @author Prospress * @category Admin * @package WooCommerce Subscriptions/Admin - * @version 2.3 - * @since 2.3 + * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.3 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.3 */ if ( ! defined( 'ABSPATH' ) ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-deprecated-functions-handler.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-deprecated-functions-handler.php index cb11a9d..3831e01 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-deprecated-functions-handler.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-deprecated-functions-handler.php @@ -5,7 +5,7 @@ * @package WooCommerce Subscriptions * @category Class * @author WooCommerce - * @since 4.0.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 */ defined( 'ABSPATH' ) || exit; @@ -34,7 +34,7 @@ abstract class WCS_Deprecated_Functions_Handler { /** * Determines if a function is deprecated and handled by this class. * - * @since 4.0.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 * * @param string $function The function to check. * @return bool @@ -46,7 +46,7 @@ abstract class WCS_Deprecated_Functions_Handler { /** * Determines if there's a replacement function to call. * - * @since 4.0.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 * * @param string $function The deprecated function to check if there's a replacement for. * @return bool @@ -58,7 +58,7 @@ abstract class WCS_Deprecated_Functions_Handler { /** * Calls the replacement function if one exists. * - * @since 4.0.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 * * @param string $function The deprecated function. * @param array $arguments The deprecated function arguments. @@ -87,7 +87,7 @@ abstract class WCS_Deprecated_Functions_Handler { /** * Triggers the deprecated notice. * - * @since 4.0.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v4.0.0 * @param string $function The deprecated function. */ public function trigger_notice( $function ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-dynamic-hook-deprecator.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-dynamic-hook-deprecator.php index 0e14bc3..a017944 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-dynamic-hook-deprecator.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-dynamic-hook-deprecator.php @@ -6,7 +6,7 @@ * @subpackage WCS_Hook_Deprecator * @category Class * @author Prospress - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ abstract class WCS_Dynamic_Hook_Deprecator extends WCS_Hook_Deprecator { @@ -22,7 +22,7 @@ abstract class WCS_Dynamic_Hook_Deprecator extends WCS_Hook_Deprecator { * $wp_filter global for our hooks either, because sometime, hooks are dynamically hooked based * on other hooks. Sigh. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ public function __construct() { add_filter( 'all', array( &$this, 'check_for_deprecated_hooks' ) ); @@ -31,7 +31,7 @@ abstract class WCS_Dynamic_Hook_Deprecator extends WCS_Hook_Deprecator { /** * Check if the current hook contains the prefix of any dynamic hook that has been deprecated. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ public function check_for_deprecated_hooks() { @@ -53,7 +53,7 @@ abstract class WCS_Dynamic_Hook_Deprecator extends WCS_Hook_Deprecator { * Check if a given hook contains the prefix and if it does, attach the @see $this->maybe_handle_deprecated_hook() method * as a callback to it. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ protected function check_for_deprecated_hook( $current_hook, $new_hook_prefix, $old_hook_prefix ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-hook-deprecator.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-hook-deprecator.php index 6d8fc53..eb3d9d1 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-hook-deprecator.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-hook-deprecator.php @@ -12,7 +12,7 @@ * @subpackage WCS_Hook_Deprecator * @category Class * @author Prospress - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ abstract class WCS_Hook_Deprecator { @@ -23,7 +23,7 @@ abstract class WCS_Hook_Deprecator { /** * Bootstraps the class and hooks required actions & filters. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ public function __construct() { foreach ( $this->deprecated_hooks as $new_hook => $old_hook ) { @@ -34,7 +34,7 @@ abstract class WCS_Hook_Deprecator { /** * Check if an old hook still has callbacks attached to it, and if so, display a notice and trigger the old hook. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ public function maybe_handle_deprecated_hook() { @@ -61,7 +61,7 @@ abstract class WCS_Hook_Deprecator { /** * Check if an old hook still has callbacks attached to it, and if so, display a notice and trigger the old hook. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ protected function handle_deprecated_hook( $new_hook, $old_hook, $new_callback_args, $return_value ) { @@ -78,7 +78,7 @@ abstract class WCS_Hook_Deprecator { /** * Display a deprecated notice for old hooks. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ protected static function display_notice( $old_hook, $new_hook ) { _deprecated_function( sprintf( 'The "%s" hook uses out of date data structures so', esc_html( $old_hook ) ), '2.0 of WooCommerce Subscriptions', esc_html( $new_hook ) ); @@ -87,7 +87,7 @@ abstract class WCS_Hook_Deprecator { /** * Trigger the old hook with the original callback parameters * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ abstract protected function trigger_hook( $old_hook, $new_callback_args ); @@ -97,7 +97,7 @@ abstract class WCS_Hook_Deprecator { * Because a subscription can exist without an order in Subscriptions 2.0, the order might actually * fallback to being the subscription rather than the order used to purchase the subscription. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ protected static function get_order( $subscription ) { return ( false == $subscription->get_parent_id() ) ? $subscription : $subscription->get_parent(); @@ -109,7 +109,7 @@ abstract class WCS_Hook_Deprecator { * Because a subscription can exist without an order in Subscriptions 2.0, the order might actually * fallback to being the subscription rather than the order used to purchase the subscription. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ protected static function get_order_id( $subscription ) { return ( false == $subscription->get_parent_id() ) ? $subscription->get_id() : $subscription->get_parent_id(); @@ -118,7 +118,7 @@ abstract class WCS_Hook_Deprecator { /** * Get the first product ID for a subscription to pass to callbacks. * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ protected static function get_product_id( $subscription ) { $order_items = $subscription->get_items(); diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-migrator.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-migrator.php index c86fe4f..aae3c4c 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-migrator.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-migrator.php @@ -5,7 +5,7 @@ * @author Prospress * @category Class * @package WooCommerce Subscriptions - * @since 2.4 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4 */ if ( ! defined( 'ABSPATH' ) ) { @@ -40,7 +40,7 @@ abstract class WCS_Migrator { * @param mixed $destination_store $destination store. * @param WC_Logger $logger Logger component. * - * @since 2.4 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4 */ public function __construct( $source_store, $destination_store, $logger ) { $this->source_store = $source_store; @@ -54,7 +54,7 @@ abstract class WCS_Migrator { * @param int $entry_id * * @return bool - * @since 2.4 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4 */ abstract public function should_migrate_entry( $entry_id ); @@ -64,7 +64,7 @@ abstract class WCS_Migrator { * @param int $entry_id * * @return mixed - * @since 2.4 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4 */ abstract public function get_source_store_entry( $entry_id ); @@ -74,7 +74,7 @@ abstract class WCS_Migrator { * @param int $entry_id * * @return mixed - * @since 2.4 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4 */ abstract public function save_destination_store_entry( $entry_id ); @@ -84,7 +84,7 @@ abstract class WCS_Migrator { * @param int $entry_id * * @return mixed - * @since 2.4 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4 */ abstract public function delete_source_store_entry( $entry_id ); @@ -104,7 +104,7 @@ abstract class WCS_Migrator { * @param int $entry_id * * @return mixed - * @since 2.4 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4 */ public function migrate_entry( $entry_id ) { $source_store_item = $this->get_source_store_entry( $entry_id ); @@ -125,7 +125,7 @@ abstract class WCS_Migrator { * * @param string $message The message to be logged * - * @since 2.4.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4.0 */ protected function log( $message ) { $this->logger->add( $this->log_handle, $message ); diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-related-order-store.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-related-order-store.php index 1f0d2f8..b9618c2 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-related-order-store.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-related-order-store.php @@ -13,8 +13,8 @@ if ( ! defined( 'ABSPATH' ) ) { * Parent orders are not managed via this data store as the order data stores inherited by Subscriptions already * provide APIs for managing the parent relationship. * - * @version 2.3.0 - * @since 2.3.0 + * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.3.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.3.0 * @category Class * @author Prospress */ @@ -59,7 +59,7 @@ abstract class WCS_Related_Order_Store { * Allow third-parties to register their own custom order relationship types which should be handled by this store. * * @param array An array of order relationship types. - * @since 2.5.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.5.0 */ foreach ( (array) apply_filters( 'wcs_additional_related_order_relation_types', array() ) as $relation_type ) { self::$relation_types[] = $relation_type; diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-scheduler.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-scheduler.php index 3ac1581..7705a05 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-scheduler.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-scheduler.php @@ -6,7 +6,7 @@ * or subscription expires. * * @class WCS_Scheduler - * @version 2.0.0 + * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.0.0 * @package WooCommerce Subscriptions/Abstracts * @category Abstract Class * @author Prospress diff --git a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-table-maker.php b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-table-maker.php index 6b0afa5..5845302 100644 --- a/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-table-maker.php +++ b/vendor/woocommerce/subscriptions-core/includes/abstracts/abstract-wcs-table-maker.php @@ -7,7 +7,7 @@ * @author Prospress * @category Abstract Class * @package WooCommerce Subscriptions/Abstracts - * @since 2.4 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.4 */ if ( ! defined( 'ABSPATH' ) ) { diff --git a/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php b/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php index 3c42b6f..92f68bd 100644 --- a/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php +++ b/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php @@ -8,36 +8,35 @@ * @package WooCommerce Subscriptions * @subpackage WC_Subscriptions_Admin * @category Class - * @author Brent Shepherd - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ class WC_Subscriptions_Admin { /** * The WooCommerce settings tab name * - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ public static $tab_name = 'subscriptions'; /** * The prefix for subscription settings * - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ public static $option_prefix = 'woocommerce_subscriptions'; /** * Store an instance of the list table * - * @since 1.4.6 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.4.6 */ private static $subscriptions_list_table; /** * Store an instance of the list table * - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ private static $found_related_orders = false; @@ -45,14 +44,14 @@ class WC_Subscriptions_Admin { * Is meta boxes saved once? * * @var boolean - * @since 2.2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.2.0 */ private static $saved_product_meta = false; /** * Bootstraps the class and hooks required actions & filters. * - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ public static function init() { @@ -112,10 +111,12 @@ class WC_Subscriptions_Admin { add_action( 'woocommerce_admin_field_informational', __CLASS__ . '::add_informational_admin_field' ); + // Filter Orders list table. add_filter( 'posts_where', array( __CLASS__, 'filter_orders' ) ); + add_filter( 'woocommerce_shop_order_list_table_prepare_items_query_args', [ __CLASS__, 'filter_orders_table_by_related_orders' ] ); + // Filter get_posts used by Subscription Reports. add_filter( 'posts_where', array( __CLASS__, 'filter_orders_and_subscriptions_from_list' ) ); - add_filter( 'posts_where', array( __CLASS__, 'filter_paid_subscription_orders_for_user' ) ); add_action( 'admin_notices', __CLASS__ . '::display_renewal_filter_notice' ); @@ -158,7 +159,7 @@ class WC_Subscriptions_Admin { * Clear all transients data we have when the WooCommerce::Tools::Clear Transients action is * triggered. * - * @since 2.1.1 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.1.1 * * @return null */ @@ -180,12 +181,14 @@ class WC_Subscriptions_Admin { ); // Get all related order and subscription ranges transients - $results = $wpdb->get_col( "SELECT DISTINCT `option_name` + $results = $wpdb->get_col( + "SELECT DISTINCT `option_name` FROM `$wpdb->options` - WHERE `option_name` LIKE '%wcs-related-orders-to-%' OR `option_name` LIKE '%wcs-sub-ranges-%'" ); + WHERE `option_name` LIKE '%wcs-related-orders-to-%' OR `option_name` LIKE '%wcs-sub-ranges-%'" + ); foreach ( $results as $column ) { - $name = explode( 'transient_', $column, 2 ); + $name = explode( 'transient_', $column, 2 ); $transients_to_delete[] = $name[1]; } @@ -201,7 +204,7 @@ class WC_Subscriptions_Admin { * * @param array Array of Product types & their labels, excluding the Subscription product type. * @return array Array of Product types & their labels, including the Subscription product type. - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ public static function add_subscription_products_to_select( $product_types ) { @@ -216,7 +219,7 @@ class WC_Subscriptions_Admin { * * @param array $product_types * @return array - * @since 2.5.1 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.5.1 */ public static function add_downloadable_and_virtual_filters( $product_types ) { global $typenow; @@ -244,7 +247,7 @@ class WC_Subscriptions_Admin { * * @param array $query_vars * @return array $query_vars - * @since 2.5.1 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.5.1 */ public static function modify_downloadable_and_virtual_product_queries( $query_vars ) { global $pagenow, $typenow; @@ -271,8 +274,8 @@ class WC_Subscriptions_Admin { ); } elseif ( in_array( $current_product_type, array( 'downloadable_subscription', 'virtual_subscription' ) ) ) { // Limit query to subscription products when the "Downloadable" or "Virtual" choices under "Simple Subscription" are being used. - $query_vars['meta_value'] = 'yes'; - $query_vars['meta_key'] = '_' . str_replace( '_subscription', '', $current_product_type ); + $query_vars['meta_value'] = 'yes'; + $query_vars['meta_key'] = '_' . str_replace( '_subscription', '', $current_product_type ); $query_vars['product_type'] = 'subscription'; } @@ -282,7 +285,7 @@ class WC_Subscriptions_Admin { /** * Output the subscription specific pricing fields on the "Edit Product" admin page. * - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ public static function subscription_pricing_fields() { global $post; @@ -316,18 +319,19 @@ class WC_Subscriptions_Admin { -

+ '_subscription_sign_up_fee', - // Keep wc_input_subscription_intial_price for backward compatibility. - 'class' => 'wc_input_subscription_intial_price wc_input_subscription_initial_price wc_input_price short', - // translators: %s is a currency symbol / code - 'label' => sprintf( __( 'Sign-up fee (%s)', 'woocommerce-subscriptions' ), get_woocommerce_currency_symbol() ), - 'placeholder' => _x( 'e.g. 9.90', 'example price', 'woocommerce-subscriptions' ), - 'description' => __( 'Optionally include an amount to be charged at the outset of the subscription. The sign-up fee will be charged immediately, even if the product has a free trial or the payment dates are synced.', 'woocommerce-subscriptions' ), - 'desc_tip' => true, - 'type' => 'text', - 'data_type' => 'price', - 'custom_attributes' => array( - 'step' => 'any', - 'min' => '0', - ), - ) ); + // Sign-up Fee + woocommerce_wp_text_input( + array( + 'id' => '_subscription_sign_up_fee', + // Keep wc_input_subscription_intial_price for backward compatibility. + 'class' => 'wc_input_subscription_intial_price wc_input_subscription_initial_price wc_input_price short', + // translators: %s is a currency symbol / code + 'label' => sprintf( __( 'Sign-up fee (%s)', 'woocommerce-subscriptions' ), get_woocommerce_currency_symbol() ), + 'placeholder' => _x( 'e.g. 9.90', 'example price', 'woocommerce-subscriptions' ), + 'description' => __( 'Optionally include an amount to be charged at the outset of the subscription. The sign-up fee will be charged immediately, even if the product has a free trial or the payment dates are synced.', 'woocommerce-subscriptions' ), + 'desc_tip' => true, + 'type' => 'text', + 'data_type' => 'price', + 'custom_attributes' => array( + 'step' => 'any', + 'min' => '0', + ), + ) + ); - // Trial Length - ?>

+ // Trial Length + ?> +

-

+ '; // Only one Subscription per customer - woocommerce_wp_checkbox( array( - 'id' => '_subscription_one_time_shipping', - 'label' => __( 'One time shipping', 'woocommerce-subscriptions' ), - 'description' => __( 'Shipping for subscription products is normally charged on the initial order and all renewal orders. Enable this to only charge shipping once on the initial order. Note: for this setting to be enabled the subscription must not have a free trial or a synced renewal date.', 'woocommerce-subscriptions' ), - 'desc_tip' => true, - ) ); + woocommerce_wp_checkbox( + array( + 'id' => '_subscription_one_time_shipping', + 'label' => __( 'One time shipping', 'woocommerce-subscriptions' ), + 'description' => __( 'Shipping for subscription products is normally charged on the initial order and all renewal orders. Enable this to only charge shipping once on the initial order. Note: for this setting to be enabled the subscription must not have a free trial or a synced renewal date.', 'woocommerce-subscriptions' ), + 'desc_tip' => true, + ) + ); do_action( 'woocommerce_subscriptions_product_options_shipping' ); @@ -417,8 +427,8 @@ class WC_Subscriptions_Admin { /** * Output advanced subscription options on the "Edit Product" admin screen - * @deprecated 2.1 - * @since 1.3.5 + * @deprecated 1.0.0 - Migrated from WooCommerce Subscriptions v2.1 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.3.5 */ public static function subscription_advanced_fields() { _deprecated_function( __METHOD__, '2.1', 'WCS_Limiter::admin_edit_product_fields()' ); @@ -427,14 +437,14 @@ class WC_Subscriptions_Admin { /** * Output the subscription specific pricing fields on the "Edit Product" admin page. * - * @since 1.3 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.3 */ public static function variable_subscription_pricing_fields( $loop, $variation_data, $variation ) { global $thepostid; // When called via Ajax if ( ! function_exists( 'woocommerce_wp_text_input' ) ) { - require_once( WC()->plugin_path() . '/admin/post-types/writepanels/writepanels-init.php' ); + require_once WC()->plugin_path() . '/admin/post-types/writepanels/writepanels-init.php'; } if ( ! isset( $thepostid ) ) { @@ -448,7 +458,7 @@ class WC_Subscriptions_Admin { $billing_period = 'month'; } - include( WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory( 'templates/admin/html-variation-price.php' ) ); + include WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory( 'templates/admin/html-variation-price.php' ); wp_nonce_field( 'wcs_subscription_variations', '_wcsnonce_save_variations', false ); @@ -458,12 +468,13 @@ class WC_Subscriptions_Admin { /** * Output extra options in the Bulk Edit select box for editing Subscription terms. * - * @since 1.3 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.3 */ public static function variable_subscription_bulk_edit_actions() { global $post; - if ( WC_Subscriptions_Product::is_subscription( $post->ID ) ) : ?> + if ( WC_Subscriptions_Product::is_subscription( $post->ID ) ) : + ?> @@ -472,7 +483,8 @@ class WC_Subscriptions_Admin { - get_regular_price() - ( $product->get_regular_price() * $percent ); } else { $new_price = $product->get_regular_price() - $sale_price; } - break; + break; } if ( isset( $new_price ) && $new_price != $old_sale_price ) { @@ -695,7 +707,7 @@ class WC_Subscriptions_Admin { * * @param int $post_id ID of the parent WC_Product_Variable_Subscription * @return null - * @since 1.3 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.3 */ public static function process_product_meta_variable_subscription( $post_id ) { @@ -721,7 +733,7 @@ class WC_Subscriptions_Admin { * @param int $variation_id * @param int $i * return void - * @since 2.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0 */ public static function save_product_variation( $variation_id, $index ) { @@ -821,18 +833,31 @@ class WC_Subscriptions_Admin { * * @param array Array of Product types & their labels, excluding the Subscription product type. * @return array Array of Product types & their labels, including the Subscription product type. - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ public static function enqueue_styles_scripts() { global $post; - // Get admin screen id + // Get admin screen ID. $screen = get_current_screen(); - $is_woocommerce_screen = in_array( $screen->id, array( 'product', 'edit-shop_order', 'shop_order', 'edit-shop_subscription', 'shop_subscription', 'users', 'woocommerce_page_wc-settings' ) ); + $is_woocommerce_screen = in_array( + $screen->id, + [ + 'product', + 'edit-shop_order', + 'shop_order', + 'edit-shop_subscription', + 'shop_subscription', + 'users', + 'woocommerce_page_wc-settings', + 'woocommerce_page_wc-orders', + wcs_get_page_screen_id( 'shop_subscription' ), + ], + true + ); if ( $is_woocommerce_screen ) { - $dependencies = array( 'jquery' ); $woocommerce_admin_script_handle = 'wc-admin-meta-boxes'; @@ -870,12 +895,7 @@ class WC_Subscriptions_Admin { } elseif ( 'shop_order' == $screen->id ) { $dependencies[] = $woocommerce_admin_script_handle; $dependencies[] = 'wc-admin-order-meta-boxes'; - - if ( wcs_is_woocommerce_pre( '2.6' ) ) { - $dependencies[] = 'wc-admin-order-meta-boxes-modal'; - } - - $script_params = array( + $script_params = array( 'trashWarning' => $trashing_subscription_order_warning, 'changeMetaWarning' => __( "WARNING: Bad things are about to happen!\n\nThe payment gateway used to purchase this subscription does not support modifying a subscription's details.\n\nChanges to the billing period, recurring discount, recurring tax or recurring total may not be reflected in the amount charged by the payment gateway.", 'woocommerce-subscriptions' ), 'removeItemWarning' => __( 'You are deleting a subscription item. You will also need to manually cancel and trash the subscription on the Manage Subscriptions screen.', 'woocommerce-subscriptions' ), @@ -891,6 +911,8 @@ class WC_Subscriptions_Admin { $script_params = array( 'enablePayPalWarning' => __( 'PayPal Standard has a number of limitations and does not support all subscription features.', 'woocommerce-subscriptions' ) . "\n\n" . __( 'Because of this, it is not recommended as a payment method for Subscriptions unless it is the only available option for your country.', 'woocommerce-subscriptions' ), ); + } elseif ( in_array( $screen->id, [ wcs_get_page_screen_id( 'shop_subscription' ), 'edit-shop_subscription' ], true ) ) { + $script_params['i18n_remove_personal_data_notice'] = __( 'This action cannot be reversed. Are you sure you wish to erase personal data from the selected subscriptions?', 'woocommerce-subscriptions' ); } $script_params['ajaxLoaderImage'] = WC()->plugin_url() . '/assets/images/ajax-loader.gif'; @@ -912,7 +934,7 @@ class WC_Subscriptions_Admin { 'pricePointerContent' => sprintf( _x( '%1$sSet a Price%2$s%3$sSubscription prices are a little different to other product prices. For a subscription, you can set a billing period, length, sign-up fee and free trial.%4$s', 'used in admin pointer script params in javascript as price pointer content', 'woocommerce-subscriptions' ), '

', '

', '

', '

' ), ); - wp_enqueue_script( 'woocommerce_subscriptions_admin_pointers', WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'assets/js/admin/admin-pointers.js' ), $dependencies, WC_Subscriptions_Core_Plugin::instance()->get_plugin_version() ); + wp_enqueue_script( 'woocommerce_subscriptions_admin_pointers', WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'assets/js/admin/admin-pointers.js' ), $dependencies, WC_Subscriptions_Core_Plugin::instance()->get_library_version(), true ); wp_localize_script( 'woocommerce_subscriptions_admin_pointers', 'WCSPointers', apply_filters( 'woocommerce_subscriptions_admin_pointer_script_parameters', $pointer_script_params ) ); @@ -921,12 +943,8 @@ class WC_Subscriptions_Admin { } if ( $is_woocommerce_screen || 'edit-product' == $screen->id || ( isset( $_GET['page'], $_GET['tab'] ) && 'wc-reports' === $_GET['page'] && 'subscriptions' === $_GET['tab'] ) ) { - wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_Subscriptions_Core_Plugin::instance()->get_plugin_version() ); - wp_enqueue_style( 'woocommerce_subscriptions_admin', WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'assets/css/admin.css' ), array( 'woocommerce_admin_styles' ), WC_Subscriptions_Core_Plugin::instance()->get_plugin_version() ); - } - - if ( in_array( $screen->id, array( 'shop_order', 'edit-shop_subscription', 'shop_subscription' ) ) && wcs_is_woocommerce_pre( '3.3' ) ) { - wp_enqueue_style( 'wc_subscriptions_statuses_admin', WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'assets/css/admin-order-statuses.css' ), array( 'woocommerce_admin_styles' ), WC_Subscriptions_Core_Plugin::instance()->get_plugin_version() ); + wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_Subscriptions_Core_Plugin::instance()->get_library_version() ); + wp_enqueue_style( 'woocommerce_subscriptions_admin', WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'assets/css/admin.css' ), array( 'woocommerce_admin_styles' ), WC_Subscriptions_Core_Plugin::instance()->get_library_version() ); } } @@ -940,7 +958,7 @@ class WC_Subscriptions_Admin { $last_column = array_slice( $columns, -1, 1, true ); array_pop( $columns ); $columns['woocommerce_active_subscriber'] = __( 'Active subscriber?', 'woocommerce-subscriptions' ); - $columns += $last_column; + $columns += $last_column; } return $columns; @@ -953,7 +971,7 @@ class WC_Subscriptions_Admin { * @param string $column_name The string key for the current column in an admin table * @param int $user_id The ID of the user to which this row relates * @return string $value A check mark if the column is the active_subscriber column and the user has an active subscription. - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ public static function user_column_values( $value, $column_name, $user_id ) { @@ -974,17 +992,18 @@ class WC_Subscriptions_Admin { * display all the subscriptions that have been purchased. * * @uses WC_Subscriptions_List_Table - * @since 1.0 + * @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0 */ public static function subscriptions_management_page() { $subscriptions_table = self::get_subscriptions_list_table(); - $subscriptions_table->prepare_items(); ?> + $subscriptions_table->prepare_items(); + ?>

- messages(); ?> - views(); ?> + messages(); ?> + views(); ?>