diff --git a/.github/workflows/generate-translations.yml b/.github/workflows/generate-translations.yml new file mode 100644 index 0000000..58e965d --- /dev/null +++ b/.github/workflows/generate-translations.yml @@ -0,0 +1,18 @@ +name: Generate Translations +on: workflow_dispatch +jobs: + generate-translations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: WordPress POT/PO/MO Generator + uses: strangerstudios/action-wp-pot-po-mo-generator@main + with: + generate_pot: 1 + generate_po: 1 + generate_mo: 1 + generate_lang_packs: 1 + merge_changes: 1 + headers: '{"Report-Msgid-Bugs-To":"info@strangerstudios.com","Last-Translator":"Stranger Studios ","Language-Team":"Stranger Studios "}' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml new file mode 100644 index 0000000..67cfbaf --- /dev/null +++ b/.github/workflows/label-sync.yml @@ -0,0 +1,23 @@ +name: Sync labels +on: + # You can run this with every type of event, but it's better to run it only when you actually need it. + workflow_dispatch: + +jobs: + labels: + runs-on: ubuntu-latest + + steps: + - uses: strangerstudios/label-sync@v2 + with: + # If you want to use a source repo, you can put is name here (only the owner/repo format is accepted) + source-repo: strangerstudios/paid-memberships-pro + + # If you want to delete any additional label, set this to true + delete-other-labels: true + + #If you want the action just to show you the preview of the changes, without actually editing the labels, set this to tru + dry-run: false + + # You can change the token used to change the labels, this is the default one + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 440115a..df30750 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,9 @@ # [Sitewide Sales](https://sitewidesales.com) # ### Welcome to the Sitewide Sales GitHub Repository -Sitewide Sales allows you to run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site. The plugin offers modules for [WooCommerce](https://woocommerce.com), [Paid Memberships Pro](https://www.paidmembershipspro.com), [Easy Digital Downloads](https://easydigitaldownloads.com/). +Sitewide Sales allows you to run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site. + +This plugin offers modules for [WooCommerce](https://sitewidesales.com/modules/woocommerce/), [Paid Memberships Pro](https://sitewidesales.com/modules/paid-memberships-pro/), and [Easy Digital Downloads](https://sitewidesales.com/modules/easy-digital-downloads/). You can also use the [Custom sale module](https://sitewidesales.com/modules/custom-module/) to track any banner > landing page > conversion workflow. New integrations will be built as requested. Let Sitewide Sales handle your sale banners, notification bars, landing pages, and reporting. Running a sale like this used to require three or more separate plugins. Now you can run your sale with a single tool. At the same time, the Sitewide Sales plugin is flexible enough that you can use specific banner and landing page plugins if wanted. diff --git a/adminpages/report-csv.php b/adminpages/report-csv.php new file mode 100644 index 0000000..82fdb8d --- /dev/null +++ b/adminpages/report-csv.php @@ -0,0 +1,135 @@ +get_daily_sale_revenue(); + $landing_page_post_id = $sitewide_sale->get_landing_page_post_id(); + +} + +$headers = array(); +$headers[] = "Content-Type: text/csv"; +$headers[] = "Cache-Control: max-age=0, no-cache, no-store"; +$headers[] = "Pragma: no-cache"; +$headers[] = "Connection: close"; + +// Generate a filename based on the params. +$filename = $sitewide_sale->get_name() . "_" . date( "Y-m-d_H-i", current_time( 'timestamp' ) ) . ".csv"; +$headers[] = "Content-Disposition: attachment; filename={$filename};"; + +$left_header= array ( + "sale ID", + "sale name", + "landing page", + "start date", + "end date", + "banner reach", + "landing page visits", + "checkouts using coupon " . $sitewide_sale->get_coupon(), + "sale revenue", + "other new revenue", + "renewals", + "total revenue in period" +); + +$csv_file_header_array = array_merge( $left_header, array_keys( $daily_revenue ) ); + +$dateformat = get_option( 'date_format' ) . ' ' . get_option( 'time_format' ); + +// Generate a temporary file to store the data in. +$tmp_dir = apply_filters( 'swsales_report_csv_export_tmp_dir', sys_get_temp_dir() ); + +$filename = tempnam( $tmp_dir, 'sws_reportcsv_' ); + +// open in append mode +$csv_fh = fopen( $filename, 'a' ); + +//write the CSV header to the file +fputcsv( $csv_fh, $csv_file_header_array); + +$csvoutput = array( + $id, + $sitewide_sale->get_name(), + get_permalink( $landing_page_post_id ), + $sitewide_sale->get_start_date(), + $sitewide_sale->get_end_date(), + $sitewide_sale->get_banner_impressions(), + $sitewide_sale->get_landing_page_visits(), + $sitewide_sale->get_checkout_conversions(), + $sitewide_sale->get_sale_revenue(), + $sitewide_sale->get_other_revenue(), + $sitewide_sale->get_renewal_revenue(), + $sitewide_sale->get_total_revenue() +); + +$csvoutput = array_merge( $csvoutput, array_values( $daily_revenue ) ); + +fputcsv( $csv_fh, $csvoutput ); + +//flush the buffer +wp_cache_flush(); + +swsales_transmit_report_data( $csv_fh, $filename, $headers ); + + +function swsales_transmit_report_data( $csv_fh, $filename, $headers = array() ) { + + //close the temp file + fclose( $csv_fh ); + + if ( version_compare( phpversion(), '5.3.0', '>' ) ) { + + //make sure we get the right file size + clearstatcache( true, $filename ); + } else { + // for any PHP version prior to v5.3.0 + clearstatcache(); + } + + //did we accidentally send errors/warnings to browser? + if ( headers_sent() ) { + echo str_repeat( '-', 75 ) . "
\n"; + echo 'Please open a support case and paste in the warnings/errors you see above this text to\n '; + echo 'Sitewide Sales support
\n'; + echo str_repeat( "=", 75 ) . "
\n"; + echo file_get_contents( $filename ); + echo str_repeat( "=", 75 ) . "
\n"; + } + + //transmission + if ( ! empty( $headers ) ) { + //set the download size + $headers[] = "Content-Length: " . filesize( $filename ); + + //set headers + foreach ( $headers as $header ) { + header( $header . "\r\n" ); + } + + // disable compression for the duration of file download + if ( ini_get( 'zlib.output_compression' ) ) { + ini_set( 'zlib.output_compression', 'Off' ); + } + + if( function_exists( 'fpassthru' ) ) { + // use fpassthru to output the csv + $csv_fh = fopen( $filename, 'rb' ); + fpassthru( $csv_fh ); + fclose( $csv_fh ); + } else { + // use readfile() if fpassthru() is disabled (like on Flywheel Hosted) + readfile( $filename ); + } + + // remove the temp file + unlink( $filename ); + } + + exit; +} diff --git a/classes/class-swsales-about.php b/classes/class-swsales-about.php index 1116031..b1519e7 100644 --- a/classes/class-swsales-about.php +++ b/classes/class-swsales-about.php @@ -38,25 +38,12 @@ public static function show_about_page() { ?> 'strong' => array(), 'em' => array(), ); ?> -

Paid Memberships Pro, WooCommerce, and Easy Digital Downloads.', 'sitewide-sales' ), $allowed_html ), 'https://www.paidmembershipspro.com/?utm_source=sitewide-sales&utm_medium=about&utm_campaign=homepage', 'https://woocommerce.com', 'https://easydigitaldownloads.com' ); ?>

+

+

Paid Memberships Pro, WooCommerce, and Easy Digital Downloads.', 'sitewide-sales' ), $allowed_html ), 'https://sitewidesales.com/modules/paid-memberships-pro/?utm_source=sitewide-sales&utm_medium=about&utm_campaign=module-pmpro', 'https://sitewidesales.com/modules/woocommerce/?utm_source=sitewide-sales&utm_medium=about&utm_campaign=module-wc', 'https://sitewidesales.com/modules/easy-digital-downloads/?utm_source=sitewide-sales&utm_medium=about&utm_campaign=module-edd' ); ?>

+

custom module you can use to track performance with any other platforms you choose.', 'sitewide-sales' ), $allowed_html ), 'https://sitewidesales.com/modules/custom-module/?utm_source=sitewide-sales&utm_medium=about&utm_campaign=module-custom' ); ?>

- <?php esc_attr_e( 'Sitewide Sales(c) - All Rights Reserved', 'sitewide-sales' ); ?>

-

- - -

- - ' . wp_kses( __( 'Check out the Sitewide Sales documentation site for additional setup instructions, sample landing page and banner content, as well as developer documentation to further extend the templates, reporting, and integration options.', 'sitewide-sales' ), $allowed_html ) . '

'; - ?> +

|

diff --git a/classes/class-swsales-landing-pages.php b/classes/class-swsales-landing-pages.php index 0042a9d..b6d22ac 100644 --- a/classes/class-swsales-landing-pages.php +++ b/classes/class-swsales-landing-pages.php @@ -204,8 +204,10 @@ public static function the_content( $content ) { // Load the sale. $sitewide_sale = new SWSales_Sitewide_Sale(); $sale_found = $sitewide_sale->load_sitewide_sale( $sitewide_sale_id ); - // The ID we have isn't a Sitewide Sale CPT, return the content. - if ( ! $sale_found ) { + $landing_template = $sitewide_sale->get_landing_page_template(); + + // The ID we have isn't a Sitewide Sale CPT, or if we're not using a template we can return the content as they're most likely using blocks or a custom solution. + if ( ! $sale_found || $landing_template == '0' ) { return $content; } @@ -221,12 +223,11 @@ public static function the_content( $content ) { $r = ''; // Build the return string. - $r .= '
'; + $r .= '
'; $r .= $content; $r .= '
'; // Template specific filter only if we have a return string to adjust. - $landing_template = $sitewide_sale->get_landing_page_template(); if ( ! empty( $landing_template ) ) { $r = apply_filters( 'swsales_landing_page_content_' . $landing_template, $r, $sitewide_sale ); } diff --git a/classes/class-swsales-license.php b/classes/class-swsales-license.php index e6fbe36..4233d1f 100644 --- a/classes/class-swsales-license.php +++ b/classes/class-swsales-license.php @@ -16,7 +16,7 @@ public static function add_license_page() { if ( swsales_license_is_valid( $key, NULL ) ) { $span_color = '#33FF00'; } else { - $span_color = '#FF3333'; + $span_color = '#FCD34D'; } add_submenu_page( 'edit.php?post_type=sitewide_sale', @@ -80,7 +80,7 @@ public static function show_license_page() { - +

diff --git a/classes/class-swsales-metaboxes.php b/classes/class-swsales-metaboxes.php index 688df2e..2122947 100644 --- a/classes/class-swsales-metaboxes.php +++ b/classes/class-swsales-metaboxes.php @@ -313,6 +313,26 @@ public static function display_step_type( $post ) { // Filter to add custom settings from module . do_action( 'swsales_after_choose_sale_type', $cur_sale ); ?> + + + + + +

+ + @@ -361,7 +381,7 @@ public static function display_step_banner( $post ) { - + @@ -109,11 +112,11 @@ public static function add_choose_coupon( $cur_sale ) { if( is_array( $coupons ) ){ foreach ( $coupons as $coupon ) { $selected_modifier = ''; - if ( $coupon->ID === $current_coupon ) { + if ( (int)$coupon->id === $current_coupon ) { $selected_modifier = ' selected="selected"'; $coupon_found = $coupon; } - echo ''; + echo ''; } } ?> @@ -434,11 +437,12 @@ public static function checkout_conversions( $cur_conversions, $sitewide_sale ) /** * Set EDD total revenue for Sitewide Sale report. * - * @param string $cur_revenue set by filter. + * @param string $cur_revenue set by filter. * @param SWSales_Sitewide_Sale $sitewide_sale to generate report for. - * @return string + * @param bool $format_price whether to format the price. + * @return string The sale revenue. */ - public static function sale_revenue( $cur_revenue, $sitewide_sale ) { + public static function sale_revenue( $cur_revenue, $sitewide_sale, $format_price = false ) { global $wpdb; if ( 'edd' !== $sitewide_sale->get_sale_type() ) { return $cur_revenue; @@ -461,7 +465,7 @@ public static function sale_revenue( $cur_revenue, $sitewide_sale ) { AND eddoa.type = 'discount' " ); - return wp_strip_all_tags( edd_currency_filter( edd_format_amount( $sale_revenue ) ) ); + return $format_price ? wp_strip_all_tags( edd_currency_filter( edd_format_amount( $sale_revenue ) ) ) : $sale_revenue; } /** @@ -523,85 +527,6 @@ public static function swsales_daily_revenue_chart_currency_format( $currency_fo ); } - /** - * Add additional EDD module revenue report for Sitewide Sale. - * - * @param SWSales_Sitewide_Sale $sitewide_sale to generate report for. - * @return string - */ - public static function additional_report( $sitewide_sale ) { - global $wpdb; - if ( 'edd' !== $sitewide_sale->get_sale_type() ) { - return; - } - - $sale_start_date = $sitewide_sale->get_start_date('Y-m-d H:i:s'); - $sale_end_date = $sitewide_sale->get_end_date('Y-m-d H:i:s'); - $coupon_id = $sitewide_sale->get_meta_value( 'swsales_edd_coupon_id', null ); - $coupon_code = new \EDD_Discount( $coupon_id ); - - $total_rev = $wpdb->get_var( " - SELECT DISTINCT SUM(p.total) - FROM {$wpdb->prefix}edd_orders as p - INNER JOIN {$wpdb->prefix}edd_order_adjustments as pm ON p.id = pm.object_id - WHERE p.type = 'sale' - AND p.status = 'complete' - AND p.date_completed >= '{$sale_start_date}' - AND p.date_completed <= '{$sale_end_date}' - " ); - $new_rev_with_code = $wpdb->get_var( " - SELECT DISTINCT SUM(p.total) - FROM {$wpdb->prefix}edd_orders as p - INNER JOIN {$wpdb->prefix}edd_order_adjustments as eddoa ON p.id = eddoa.object_id - WHERE p.type = 'sale' - AND p.status = 'complete' - AND p.date_completed >= '{$sale_start_date}' - AND p.date_completed <= '{$sale_end_date}' - AND eddoa.description = upper('{$coupon_code->code}') - AND eddoa.type = 'discount' - " ); - - $new_rev_without_code = $total_rev - $new_rev_with_code; - - ?> -
-

-

- get_start_date(), - $sitewide_sale->get_end_date() - ); - ?> -

-
-
-
-

-

- -
- (%) -

-
-
-

-

- -
- (%) -

-
-
-

-

-
-
-
- get_sale_type() ) { return $cur_revenue; @@ -699,7 +624,7 @@ public static function legacy_sale_revenue( $cur_revenue, $sitewide_sale ) { } } - return wp_strip_all_tags( edd_currency_filter( edd_format_amount( $cart_total ) ) ); + return $format_price ? wp_strip_all_tags( edd_currency_filter( edd_format_amount( $cart_total ) ) ) : $cart_total; } /** @@ -741,8 +666,7 @@ public static function legacy_daily_revenue_chart_data( $daily_revenue_chart_dat $cart_total = 0; $payment_data = maybe_unserialize( $data->value ); - if( !empty( $payment_data['discount'] ) && $payment_data['discount'] == $coupon_code->code ){ - + if( !empty( $payment_data['user_info']['discount'] ) && $payment_data['user_info']['discount'] == $coupon_code->code ){ foreach( $payment_data['cart_details'] as $cart ){ $cart_total = $cart_total + $cart['price']; } @@ -767,108 +691,57 @@ public static function legacy_daily_revenue_chart_data( $daily_revenue_chart_dat } /** - * Add additional PMPro module revenue report for Sitewide Sale. + * Get other revenue * - * @param SWSales_Sitewide_Sale $sitewide_sale to generate report for. + * @param string $cur_other_revenue The current other revenue. + * @param SWSales_Sitewide_Sale $sitewide_sale The sitewide sale being reported on. + * @param bool $format_price Whether to format the price. * @return string + * + * @since 1.4 + * + */ + public static function get_other_revenue ( $cur_other_revenue, $sitewide_sale, $format_price = false ) { + if ( 'edd' !== $sitewide_sale->get_sale_type() ) { + return $cur_other_revenue; + } + + $total_revenue = self::total_revenue( null, $sitewide_sale, false ); + $sale_revenue = self::sale_revenue( null, $sitewide_sale, false ); + $other_revenue = (float)$total_revenue - (float)$sale_revenue; + + return $format_price ? wp_strip_all_tags( edd_currency_filter( edd_format_amount( $other_revenue ) ) ) : $other_revenue; + } + + /** + * Get total revenue + * + * @param string $cur_total_revenue The current total revenue. + * @param SWSales_Sitewide_Sale $sitewide_sale The sitewide sale being reported on. + * @param bool $format_price Whether to format the price. + * + * @since 1.4 */ - public static function legacy_additional_report( $sitewide_sale ) { + public static function total_revenue( $cur_total_revenue, $sitewide_sale, $format_price = false ) { global $wpdb; if ( 'edd' !== $sitewide_sale->get_sale_type() ) { - return; + return $cur_total_revenue; } $sale_start_date = $sitewide_sale->get_start_date('Y-m-d H:i:s'); $sale_end_date = $sitewide_sale->get_end_date('Y-m-d H:i:s'); - $coupon_id = $sitewide_sale->get_meta_value( 'swsales_edd_coupon_id', null ); - $coupon_code = new \EDD_Discount( $coupon_id ); - $sale_revenue = $wpdb->get_results( " - SELECT * - FROM {$wpdb->prefix}posts as p - INNER JOIN {$wpdb->prefix}postmeta as eddoa ON p.ID = eddoa.post_id - WHERE p.post_type = 'edd_payment' - AND( p.post_status = 'publish' OR p.post_status = 'edd_subscription' ) - AND p.post_date >= '{$sale_start_date}' - AND p.post_date <= '{$sale_end_date}' - AND eddoa.meta_key = '_edd_payment_meta' + $total_rev = $wpdb->get_var( " + SELECT DISTINCT SUM(p.total) + FROM {$wpdb->prefix}edd_orders as p + INNER JOIN {$wpdb->prefix}edd_order_adjustments as pm ON p.id = pm.object_id + WHERE p.type = 'sale' + AND p.status = 'complete' + AND p.date_completed >= '{$sale_start_date}' + AND p.date_completed <= '{$sale_end_date}' " ); - $total_renewals = 0; - $new_rev_with_code = 0; - $new_rev_without_code = 0; - - if( $sale_revenue ){ - foreach( $sale_revenue as $con ){ - $payment_data = maybe_unserialize( $con->meta_value ); - if( $con->post_status == 'edd_subscription' ){ - //Renewal. - foreach( $payment_data['cart_details'] as $cart ) { - $total_renewals += $cart['price']; - } - } elseif ( $payment_data['user_info']['discount'] === $coupon_code->code ) { - // Purchase with code. - foreach( $payment_data['cart_details'] as $cart ) { - $new_rev_with_code += $cart['price']; - } - } else { - // Purchase without code. - foreach( $payment_data['cart_details'] as $cart ) { - $new_rev_without_code += $cart['price']; - } - } - } - } - - $total_rev = $new_rev_without_code + $new_rev_with_code + $total_renewals; - - ?> -
-

-

- get_start_date(), - $sitewide_sale->get_end_date() - ); - ?> -

-
-
-
-

-

- -
- (%) -

-
-
-

-

- -
- (%) -

-
- -
-

-

- -
- (%) -

-
- -
-

-

-
-
-
- get_results( "SELECT * FROM $wpdb->pmpro_discount_codes", OBJECT ); + + // Query the database for the discount codes. + $codes = $wpdb->get_results( "SELECT * FROM $wpdb->pmpro_discount_codes", OBJECT ); + + // Get the discount code (if set) for the sale. $current_discount = $cur_sale->get_meta_value( 'swsales_pmpro_discount_code_id', null ); ?> @@ -148,53 +157,12 @@ public static function add_choose_discount_code( $cur_sale ) { } // end add_choose_discount_code() /** - * Adds option to choose the default level for checkout on SWSale - * landing page in Edit Sitewide Sale page. - * - * @param SWSales_Sitewide_Sale $cur_sale that is being edited. - */ - public static function add_set_landing_page_default_level( $cur_sale ) { - ?> - - - - - - - - - - @@ -207,7 +175,7 @@ public static function add_hide_banner_by_level( $cur_sale ) { - + + + + + + + + + + + get_sale_type() ) { + return $hide_sale; + } + + // Get the meta value for levels this sale should be hidden for. + $hide_for_levels = json_decode( $sitewide_sale->get_meta_value( 'swsales_pmpro_hide_for_levels', '' ) ); + + // Return if there is no data for hiding sale by level. + if ( empty( $hide_for_levels ) ) { + return $hide_sale; + } + + // If this sale is hidden by level, check if the current user should see it. + if ( pmpro_hasMembershipLevel( $hide_for_levels ) ) { + $hide_sale = true; + } + + return $hide_sale; + } + /** * Get the coupon for a sitewide sale. * Callback for the swsales_coupon filter. @@ -700,31 +734,6 @@ public static function is_checkout_page( $is_checkout_page, $sitewide_sale ) { return ( ! empty( $pmpro_pages['checkout'] ) && is_page( $pmpro_pages['checkout'] ) ) ? true : $is_checkout_page; } - /** - * Returns whether the banner should be shown for the current Sitewide Sale. - * - * @param boolean $show_banner current value from filter. - * @param SWSales_Sitewide_Sale $sitewide_sale being checked. - * @return boolean - */ - public static function show_banner( $show_banner, $sitewide_sale ) { - if ( 'pmpro' !== $sitewide_sale->get_sale_type() ) { - return $show_banner; - } - // Get the meta value for levels this banner should be hidden for. - $hide_for_levels = json_decode( $sitewide_sale->get_meta_value( 'swsales_pmpro_hide_for_levels', '' ) ); - - // If the hidden levels is an empty string, convert to an array. - $hide_for_levels = empty( $hide_for_levels ) ? array() : $hide_for_levels; - - // If this banner is hidden by level, check if the current user should see it. - if ( pmpro_hasMembershipLevel( $hide_for_levels ) ) { - $show_banner = false; - } - - return $show_banner; - } - /** * Automatically applies discount code if user has the cookie set from sale page */ @@ -733,6 +742,7 @@ public static function automatic_discount_application() { if ( null === $active_sitewide_sale || 'pmpro' !== $active_sitewide_sale->get_sale_type() || ! $active_sitewide_sale->should_apply_automatic_discount() ) { return; } + global $wpdb, $pmpro_pages; if ( empty( $_REQUEST['level'] ) || ! empty( $_REQUEST['discount_code'] ) ) { return; @@ -811,20 +821,55 @@ public static function checkout_conversions( $cur_conversions, $sitewide_sale ) } /** - * Set PMPro module total revenue for Sitewide Sale report. + * Total Revenue for the period of the Sitewide Sale. * - * @param string $cur_revenue set by filter. + * @param string $cur_revenue set by filter. N/A * @param SWSales_Sitewide_Sale $sitewide_sale to generate report for. - * @param bool $format_price whether to run output through pmpro_formatPrice(). - * @return string + * @param bool $format_price whether to run output through pmpro_formatPrice(). + * @return string total revenue for the Sitewide Sale's period, despite belongs to the given Sitewide Sale + * + * @since 1.4 */ - public static function sale_revenue( $cur_revenue, $sitewide_sale, $format_price = true ) { + public static function total_revenue($cur_revenue, $sitewide_sale, $format_price = false) { if ( 'pmpro' !== $sitewide_sale->get_sale_type() ) { return $cur_revenue; } + global $wpdb; + $total_rev = $wpdb->get_var( + $wpdb->prepare( + " + SELECT SUM(mo.total) + FROM $wpdb->pmpro_membership_orders mo + WHERE mo.status NOT IN('refunded', 'review', 'token', 'error') + AND mo.timestamp >= %s + AND mo.timestamp < %s + ", + get_gmt_from_date( $sitewide_sale->get_start_date( 'Y-m-d H:i:s' ) ), + get_gmt_from_date( $sitewide_sale->get_end_date( 'Y-m-d H:i:s' ) ) + ) + ); + + return $format_price ? pmpro_formatPrice( $total_rev ) : $total_rev; + } + + /** + * Set PMPro module total revenue for Sitewide Sale report. + * + * @param string $cur_revenue set by filter. N/A + * @param SWSales_Sitewide_Sale $sitewide_sale to generate report for. + * @param bool $format_price whether to run output through pmpro_formatPrice(). + * @return string revenue for the period of the Sitewide Sale. + * + * @since 1.4 + */ + public static function sale_revenue( $cur_revenue, $sitewide_sale, $format_price = false ) { + if ( 'pmpro' !== $sitewide_sale->get_sale_type() ) { + return $cur_revenue; + } - $sale_rev = $wpdb->get_var( + global $wpdb; + $sale_revenue = $wpdb->get_var( $wpdb->prepare( " SELECT SUM(total) FROM ( @@ -838,13 +883,101 @@ public static function sale_revenue( $cur_revenue, $sitewide_sale, $format_price AND mo.timestamp < %s GROUP BY mo.id ) temp - ", + ", + intval( $sitewide_sale->get_meta_value( 'swsales_pmpro_discount_code_id', null ) ), + get_gmt_from_date( $sitewide_sale->get_start_date( 'Y-m-d H:i:s' ) ), + get_gmt_from_date( $sitewide_sale->get_end_date( 'Y-m-d H:i:s' ) ) + ) + ); + + return $format_price ? pmpro_formatPrice( $sale_revenue ) : $sale_revenue; + } + + /** + * Get revenue from other sales during the same time period. + * + * @param string $cur_revenue set by filter. N/A + * @param SWSales_Sitewide_Sale $sitewide_sale being reported on. + * @param bool $format_price whether to run output through pmpro_formatPrice(). + * @return string revenue from other sales during the same time period. + */ + public static function get_other_revenue ($cur_revenue, $sitewide_sale, $format_price = false) { + if ( 'pmpro' !== $sitewide_sale->get_sale_type() ) { + return $cur_revenue; + } + global $wpdb; + $other_revenue = $wpdb->get_var( + $wpdb->prepare( + " + SELECT SUM(total) FROM ( + SELECT mo.total as total + FROM $wpdb->pmpro_membership_orders mo + LEFT JOIN $wpdb->pmpro_discount_codes_uses dcu + ON dcu.order_id = mo.id + LEFT JOIN $wpdb->pmpro_membership_orders mo2 + ON mo.user_id = mo2.user_id + AND mo2.id <> mo.id + AND mo2.status NOT IN('refunded', 'review', 'token', 'error') + WHERE (dcu.code_id IS NULL OR dcu.code_id <> %d) #null or different code + AND mo.status NOT IN('refunded', 'review', 'token', 'error') + AND mo.timestamp >= %s + AND mo.timestamp < %s + #no other order for the same user + AND mo2.id IS NULL + GROUP BY mo.id + ) temp + ", intval( $sitewide_sale->get_meta_value( 'swsales_pmpro_discount_code_id', null ) ), get_gmt_from_date( $sitewide_sale->get_start_date( 'Y-m-d H:i:s' ) ), get_gmt_from_date( $sitewide_sale->get_end_date( 'Y-m-d H:i:s' ) ) ) ); - return $format_price ? pmpro_formatPrice( $sale_rev ) : $sale_rev; + + return $format_price ? pmpro_formatPrice( $other_revenue ) : $other_revenue; + } + + /** + * Get revenue from renewals during the same time period. + * + * @param string $cur_revenue set by filter. N/A + * @param SWSales_Sitewide_Sale $sitewide_sale being reported on. + * @param bool $format_price whether to run output through pmpro_formatPrice(). + * @return string revenue from renewals during the same time period. + */ + public static function get_renewal_revenue($cur_revenue, $sitewide_sale, $format_price = false) { + if ( 'pmpro' !== $sitewide_sale->get_sale_type() ) { + return $cur_revenue; + } + global $wpdb; + + $renewal_revenue = $wpdb->get_var( + $wpdb->prepare( + " + SELECT SUM(total) FROM ( + SELECT mo.total as total + FROM $wpdb->pmpro_membership_orders mo + LEFT JOIN $wpdb->pmpro_discount_codes_uses dcu + ON dcu.order_id = mo.id + LEFT JOIN $wpdb->pmpro_membership_orders mo2 + ON mo.user_id = mo2.user_id + AND mo2.id <> mo.id + AND mo2.status NOT IN('refunded', 'review', 'token', 'error') + WHERE (dcu.code_id IS NULL OR dcu.code_id <> %d) #null or different code + AND mo.status NOT IN('refunded', 'review', 'token', 'error') + AND mo.timestamp >= %s + AND mo.timestamp < %s + #another order for the same user + AND mo2.id IS NOT NULL + GROUP BY mo.id + ) temp + ", + intval( $sitewide_sale->get_meta_value( 'swsales_pmpro_discount_code_id', null ) ), + get_gmt_from_date( $sitewide_sale->get_start_date( 'Y-m-d H:i:s' ) ), + get_gmt_from_date( $sitewide_sale->get_end_date( 'Y-m-d H:i:s' ) ) + ) + ); + + return $format_price ? pmpro_formatPrice( $renewal_revenue ) : $renewal_revenue; } /** @@ -901,133 +1034,5 @@ public static function swsales_daily_revenue_chart_currency_format( $currency_fo 'position' => pmpro_getCurrencyPosition() == 'right' ? 'suffix' : 'prefix' ); } - - /** - * Add additional PMPro module revenue report for Sitewide Sale. - * - * @param SWSales_Sitewide_Sale $sitewide_sale to generate report for. - * @return string - */ - public static function additional_report( $sitewide_sale ) { - if ( 'pmpro' !== $sitewide_sale->get_sale_type() ) { - return; - } - global $wpdb; - $total_rev = floatval( - $wpdb->get_var( - $wpdb->prepare( - " - SELECT SUM(mo.total) - FROM $wpdb->pmpro_membership_orders mo - WHERE mo.status NOT IN('refunded', 'review', 'token', 'error') - AND mo.timestamp >= %s - AND mo.timestamp < %s - ", - get_gmt_from_date( $sitewide_sale->get_start_date( 'Y-m-d H:i:s' ) ), - get_gmt_from_date( $sitewide_sale->get_end_date( 'Y-m-d H:i:s' ) ) - ) - ) - ); - $new_rev_with_code = floatval( self::sale_revenue( null, $sitewide_sale, false ) ); - $new_rev_without_code = $wpdb->get_var( - $wpdb->prepare( - " - SELECT SUM(total) FROM ( - SELECT mo.total as total - FROM $wpdb->pmpro_membership_orders mo - LEFT JOIN $wpdb->pmpro_discount_codes_uses dcu - ON dcu.order_id = mo.id - LEFT JOIN $wpdb->pmpro_membership_orders mo2 - ON mo.user_id = mo2.user_id - AND mo2.id <> mo.id - AND mo2.status NOT IN('refunded', 'review', 'token', 'error') - WHERE (dcu.code_id IS NULL OR dcu.code_id <> %d) #null or different code - AND mo.status NOT IN('refunded', 'review', 'token', 'error') - AND mo.timestamp >= %s - AND mo.timestamp < %s - #no other order for the same user - AND mo2.id IS NULL - GROUP BY mo.id - ) temp - ", - intval( $sitewide_sale->get_meta_value( 'swsales_pmpro_discount_code_id', null ) ), - get_gmt_from_date( $sitewide_sale->get_start_date( 'Y-m-d H:i:s' ) ), - get_gmt_from_date( $sitewide_sale->get_end_date( 'Y-m-d H:i:s' ) ) - ) - ); - $renewals = $wpdb->get_var( - $wpdb->prepare( - " - SELECT SUM(total) FROM ( - SELECT mo.total as total - FROM $wpdb->pmpro_membership_orders mo - LEFT JOIN $wpdb->pmpro_discount_codes_uses dcu - ON dcu.order_id = mo.id - LEFT JOIN $wpdb->pmpro_membership_orders mo2 - ON mo.user_id = mo2.user_id - AND mo2.id <> mo.id - AND mo2.status NOT IN('refunded', 'review', 'token', 'error') - WHERE (dcu.code_id IS NULL OR dcu.code_id <> %d) #null or different code - AND mo.status NOT IN('refunded', 'review', 'token', 'error') - AND mo.timestamp >= %s - AND mo.timestamp < %s - #another order for the same user - AND mo2.id IS NOT NULL - GROUP BY mo.id - ) temp - ", - intval( $sitewide_sale->get_meta_value( 'swsales_pmpro_discount_code_id', null ) ), - get_gmt_from_date( $sitewide_sale->get_start_date( 'Y-m-d H:i:s' ) ), - get_gmt_from_date( $sitewide_sale->get_end_date( 'Y-m-d H:i:s' ) ) - ) - ); - - ?> -
-

-

- get_start_date(), - $sitewide_sale->get_end_date() - ); - ?> -

-
-
-
-

-

- -
- (%) -

-
-
-

-

- -
- (%) -

-
-
-

-

- -
- (%) -

-
-
-

-

-
-
-
- -1, - 'orderby' => 'title', - 'order' => 'asc', - 'post_type' => 'shop_coupon', - 'post_status' => 'publish', - ); - - $coupons = get_posts( $args ); + global $wpdb; + + // Query the database for the coupons and only retrieve ID and post_title (coupon name). + $coupon_limit = apply_filters( 'swsales_wc_coupon_limit', 5000 ); + $coupons = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'shop_coupon' AND post_status = 'publish' LIMIT %d", $coupon_limit ), OBJECT ); + + // Get the current coupon (if set) for the sale. $current_coupon = intval( $cur_sale->get_meta_value( 'swsales_wc_coupon_id', null ) ); ?> @@ -104,7 +106,7 @@ public static function add_choose_coupon( $cur_sale ) { $coupon_found = false; foreach ( $coupons as $coupon ) { $selected_modifier = ''; - if ( $coupon->ID === $current_coupon ) { + if ( (int)$coupon->ID === $current_coupon ) { $selected_modifier = ' selected="selected"'; $coupon_found = $coupon; } @@ -375,6 +377,8 @@ public static function strike_prices( $price, $product ) { } // Get pricing for variable products. + + if ( $product->is_type( 'variable' ) ) { $prices = $product->get_variation_prices( true ); $min_price = current( $prices['price'] ); @@ -389,9 +393,15 @@ public static function strike_prices( $price, $product ) { $max_discounted_price = max( $max_price - $max_discount_amount, 0 ); if ( $min_discount_amount > 0 || $max_discount_amount > 0 ) { - $regular_range = wc_format_price_range( $min_price, $max_price ); - $discounted_range = wc_format_price_range( $min_discounted_price, $max_discounted_price ); - $price = '' . $discounted_range . ''; + if ( $min_price == $max_price && $min_discounted_price == $max_discounted_price ) { + // All variations are the same price. Show as a single price with strikethrough. + $price = '' . wc_price( $min_discounted_price ) . ''; + } else { + // Show variations as a range of prices with strikethrough range. + $regular_range = wc_format_price_range( $min_price, $max_price ); + $discounted_range = wc_format_price_range( $min_discounted_price, $max_discounted_price ); + $price = '' . $discounted_range . ''; + } } } } @@ -502,12 +512,16 @@ public static function checkout_conversions( $cur_conversions, $sitewide_sale ) /** * Set WC module total revenue for Sitewide Sale report. * - * @param string $cur_revenue set by filter. + * @param string $cur_revenue set by filter. N/A * @param SWSales_Sitewide_Sale $sitewide_sale to generate report for. - * @return string + * @param bool $format_price whether to run output through pmpro_formatPrice(). + * @return string revenue for the period of the Sitewide Sale. + * + * @since 1.4 */ - public static function sale_revenue( $cur_revenue, $sitewide_sale ) { + public static function sale_revenue( $cur_revenue, $sitewide_sale, $format_price = false ) { global $wpdb; + // Bail if not a WC sale. if ( 'wc' !== $sitewide_sale->get_sale_type() ) { return $cur_revenue; } @@ -529,8 +543,7 @@ public static function sale_revenue( $cur_revenue, $sitewide_sale ) { AND wcoi.order_item_type = 'coupon' AND pm.meta_key = '_order_total' " ); - - return wp_strip_all_tags( wc_price( $sale_revenue ) ); + return $format_price ? wp_strip_all_tags( wc_price( $sale_revenue ) ) : $sale_revenue; } /** @@ -594,49 +607,50 @@ public static function swsales_daily_revenue_chart_currency_format( $currency_fo } /** - * Add additional PMPro module revenue report for Sitewide Sale. + * Get other revenue * - * @param SWSales_Sitewide_Sale $sitewide_sale to generate report for. + * @param string $cur_revenue set by filter. + * @param SWSales_Sitewide_Sale $sitewide_sale being reported on. + * @param bool $format_price whether to run output through pmpro_formatPrice(). + * + * @since 1.4 + * + */ + public static function get_other_revenue ( $cur_revenue, $sitewide_sale, $format_price = false) { + if ( 'wc' !== $sitewide_sale->get_sale_type() ) { + return $cur_revenue; + } + + $total_revenue = self::total_revenue( null, $sitewide_sale, false ); + $sale_revenue = self::sale_revenue( null, $sitewide_sale, false ); + $renewal_revenue = self::get_renewal_revenue( null, $sitewide_sale, false ); + $other_revenue = (float)$total_revenue - (float)$sale_revenue - (float)$renewal_revenue; + + return $format_price ? wp_strip_all_tags( wc_price( $other_revenue ) ) : $other_revenue; + } + + /** + * get WC Renewals + * + * @param string $cur_revenue set by filter. + * @param SWSales_Sitewide_Sale $sitewide_sale being reported on. + * @param bool $format_price whether to run output through pmpro_formatPrice(). * @return string + * + * @since 1.4 */ - public static function additional_report( $sitewide_sale ) { - global $wpdb; + public static function get_renewal_revenue( $cur_revenue, $sitewide_sale, $format_price = false) { if ( 'wc' !== $sitewide_sale->get_sale_type() ) { - return; + return $cur_revenue; } + global $wpdb; + $renewal_revenue = 0; $sale_start_date = $sitewide_sale->get_start_date('Y-m-d H:i:s'); $sale_end_date = $sitewide_sale->get_end_date('Y-m-d H:i:s'); - $coupon_id = $sitewide_sale->get_meta_value( 'swsales_wc_coupon_id', null ); - $coupon_code = wc_get_coupon_code_by_id( $coupon_id ); - - $total_rev = $wpdb->get_var( " - SELECT DISTINCT SUM(pm.meta_value) - FROM {$wpdb->prefix}posts as p - INNER JOIN {$wpdb->prefix}postmeta as pm ON p.ID = pm.post_id - WHERE p.post_type = 'shop_order' - AND p.post_status IN ('wc-processing','wc-completed') - AND p.post_date >= '{$sale_start_date}' - AND p.post_date <= '{$sale_end_date}' - AND pm.meta_key = '_order_total' - " ); - $new_rev_with_code = $wpdb->get_var( " - SELECT DISTINCT SUM(pm.meta_value) - FROM {$wpdb->prefix}posts as p - INNER JOIN {$wpdb->prefix}woocommerce_order_items as wcoi ON p.ID = wcoi.order_id - INNER JOIN {$wpdb->prefix}postmeta as pm ON p.ID = pm.post_id - WHERE p.post_type = 'shop_order' - AND p.post_status IN ('wc-processing','wc-completed') - AND p.post_date >= '{$sale_start_date}' - AND p.post_date <= '{$sale_end_date}' - AND upper(wcoi.order_item_name) = upper('{$coupon_code}') - AND wcoi.order_item_type = 'coupon' - AND pm.meta_key = '_order_total' - " ); - $renewals = 0; if ( class_exists( 'WC_Subscriptions' ) ) { // WC Subscrtions enabled, see if there are any renewals in the period. - $renewals = $wpdb->get_var( + $renewal_revenue = $wpdb->get_var( $wpdb->prepare( "SELECT SUM(order_total_meta.meta_value) FROM {$wpdb->postmeta} as order_total_meta @@ -661,55 +675,38 @@ public static function additional_report( $sitewide_sale ) { ) ); } - $new_rev_without_code = $total_rev - $new_rev_with_code - $renewals; + return $format_price ? wp_strip_all_tags( wc_price( $renewal_revenue ) ) : $renewal_revenue; + } - ?> -
-

-

- get_start_date(), - $sitewide_sale->get_end_date() - ); - ?> -

-
-
-
-

-

- -
- (%) -

-
-
-

-

- -
- (%) -

-
- -
-

-

- -
- (%) -

-
- -
-

-

-
-
-
- get_sale_type() ) { + return $cur_revenue; + } + global $wpdb; + $sale_start_date = $sitewide_sale->get_start_date('Y-m-d H:i:s'); + $sale_end_date = $sitewide_sale->get_end_date('Y-m-d H:i:s'); + $total_rev = $wpdb->get_var( " + SELECT DISTINCT SUM(pm.meta_value) + FROM {$wpdb->prefix}posts as p + INNER JOIN {$wpdb->prefix}postmeta as pm ON p.ID = pm.post_id + WHERE p.post_type = 'shop_order' + AND p.post_status IN ('wc-processing','wc-completed') + AND p.post_date >= '{$sale_start_date}' + AND p.post_date <= '{$sale_end_date}' + AND pm.meta_key = '_order_total' + " ); + + return $format_price ? wp_strip_all_tags( wc_price( $total_rev ) ) : $total_rev; } } diff --git a/modules/ecommerce/wc/swsales-module-wc-metaboxes.js b/modules/ecommerce/wc/swsales-module-wc-metaboxes.js index d12a9e9..37b9633 100644 --- a/modules/ecommerce/wc/swsales-module-wc-metaboxes.js +++ b/modules/ecommerce/wc/swsales-module-wc-metaboxes.js @@ -26,6 +26,7 @@ jQuery( document ).ready( // create new coupon AJAX $( '#swsales_wc_create_coupon' ).click( function() { + $( '#swsales_wc_create_coupon' ).attr( 'disabled','disabled' ); var data = { 'action': 'swsales_wc_create_coupon', 'swsales_wc_id': $( '#post_ID' ).val(), diff --git a/package.json b/package.json index e356fcc..7b159ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sitewide-sales", - "version": "1.3.1", + "version": "1.4.0", "description": "Flash Sales for WordPress", "main": "webpack.config.js", "directories": { diff --git a/readme.txt b/readme.txt index 145c6e7..577b1ab 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: strangerstudios, dlparker1005 Tags: sales, sale, woocommerce, paid memberships pro, pmpro, black friday, cyber monday, discount Requires at least: 5.2 -Tested up to: 6.1.1 -Stable tag: 1.3.1 +Tested up to: 6.3 +Stable tag: 1.4 Run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site. @@ -23,6 +23,16 @@ This plugin offers modules for [WooCommerce](https://sitewidesales.com/modules/w == Changelog == += 1.4 - 2023-11-01 = +* FEATURE: Added feature to compare sale data for two separate sales for Reports. +* FEATURE: Added feature to download a single sale's report and daily sales data to CSV. +* FEATURE: Added support to completely hide the sale by role or membership level. +* ENHANCEMENT: Refresh admin area design. +* BUG FIX/ENHANCEMENT: Optimized discount codes/coupons query for sites with a very large number of codes. +* BUG FIX/ENHANCEMENT: Now supporting variation prices in WooCommerce when there is no range and we want to reflect strikethrough pricing for auto discount. +* BUG FIX: Fixed edge case to prevent creating multiple landing pages, coupon codes, or banners. +* BUG FIX: Removed Chart JS from enqueue on the sale CPT edit screen because it isn't needed. + = 1.3.1 - 2022-11-16 = * ENHANCEMENT: Added Multiple Members Per User (MMPU) compatibility for banners (PMPro Module). * ENHANCEMENT: Adjusted order of metaboxes on Sitewide Sale CPT edit screen to reflect recommended workflow. diff --git a/sitewide-sales-banner.png b/sitewide-sales-banner.png index ffab853..dd217ee 100644 Binary files a/sitewide-sales-banner.png and b/sitewide-sales-banner.png differ diff --git a/sitewide-sales.php b/sitewide-sales.php index c387d2f..059f6ae 100644 --- a/sitewide-sales.php +++ b/sitewide-sales.php @@ -5,7 +5,7 @@ * Description: Run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site. * Author: Stranger Studios * Author URI: https://www.strangerstudios.com - * Version: 1.3.1 + * Version: 1.4 * Plugin URI: * License: GNU GPLv2+ * Text Domain: sitewide-sales @@ -16,7 +16,7 @@ defined( 'ABSPATH' ) || die( 'File cannot be accessed directly' ); -define( 'SWSALES_VERSION', '1.3.1' ); +define( 'SWSALES_VERSION', '1.4' ); define( 'SWSALES_BASE_FILE', __FILE__ ); define( 'SWSALES_DIR', dirname( __FILE__ ) ); define( 'SWSALES_BASENAME', plugin_basename( __FILE__ ) );
- + + - - - + + + __( 'Logged Out', 'sitewide-sales' ), - ); - $hide_for_roles = json_decode( $cur_sale->get_meta_value( 'swsales_hide_banner_by_role', '[]' ) ); - foreach ( $all_roles as $slug => $role_data ) { - $selected_modifier = in_array( $slug, $hide_for_roles ) ? ' selected="selected"' : ''; - echo ''; - } - ?> - -

- - + } + ?> style="display: none;"> $current_page, 'action' => 'edit' ), admin_url( 'post.php' ) ); + $view_page_url = add_query_arg( array( 'page_id' => $current_page ), home_url( '/' ) ); ?>   @@ -517,11 +544,11 @@ public static function display_step_landing_page( $post ) {


- +  |  - +  |  - +

@@ -707,6 +734,20 @@ public static function save_swsales_metaboxes( $post_id, $post ) { update_post_meta( $post_id, 'swsales_sale_type', sanitize_text_field( $_POST['swsales_sale_type'] ) ); } + if ( ! empty( $_POST['swsales_hide_banner_by_role'] ) && is_array( $_POST['swsales_hide_banner_by_role'] )) { + $swsales_hide_banner_by_role = array_map( 'sanitize_text_field', $_POST['swsales_hide_banner_by_role'] ); + update_post_meta( $post_id, 'swsales_hide_banner_by_role', wp_json_encode( $swsales_hide_banner_by_role ) ); + } elseif ( ! empty( $_POST['swsales_hide_banner_by_role_exists'] ) ) { + update_post_meta( $post_id, 'swsales_hide_banner_by_role', wp_json_encode( array() ) ); + } + + if ( ! empty( $_POST['swsales_hide_for_roles'] ) && is_array( $_POST['swsales_hide_for_roles'] )) { + $swsales_hide_for_roles = array_map( 'sanitize_text_field', $_POST['swsales_hide_for_roles'] ); + update_post_meta( $post_id, 'swsales_hide_for_roles', wp_json_encode( $swsales_hide_for_roles ) ); + } elseif ( ! empty( $_POST['swsales_hide_for_roles_exists'] ) ) { + update_post_meta( $post_id, 'swsales_hide_for_roles', wp_json_encode( array() ) ); + } + if ( isset( $_POST['swsales_automatic_discount'] ) ) { update_post_meta( $post_id, 'swsales_automatic_discount', sanitize_text_field( $_POST['swsales_automatic_discount'] ) ); } @@ -760,13 +801,6 @@ public static function save_swsales_metaboxes( $post_id, $post ) { update_post_meta( $post_id, 'swsales_hide_on_checkout', false ); } - if ( ! empty( $_POST['swsales_hide_banner_by_role'] ) && is_array( $_POST['swsales_hide_banner_by_role'] )) { - $swsales_hide_banner_by_role = array_map( 'sanitize_text_field', $_POST['swsales_hide_banner_by_role'] ); - update_post_meta( $post_id, 'swsales_hide_banner_by_role', wp_json_encode( $swsales_hide_banner_by_role ) ); - } elseif ( ! empty( $_POST['swsales_hide_banner_by_role_exists'] ) ) { - update_post_meta( $post_id, 'swsales_hide_banner_by_role', wp_json_encode( array() ) ); - } - $options = SWSales_Settings::get_options(); if ( isset( $_POST['swsales_set_as_sitewide_sale'] ) ) { $options['active_sitewide_sale_id'] = $post_id; diff --git a/classes/class-swsales-reports.php b/classes/class-swsales-reports.php index c598cee..690b741 100644 --- a/classes/class-swsales-reports.php +++ b/classes/class-swsales-reports.php @@ -15,6 +15,7 @@ public static function init() { add_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_tracking_js' ) ); add_action( 'wp_ajax_swsales_ajax_tracking', array( __CLASS__, 'ajax_tracking' ) ); add_action( 'wp_ajax_nopriv_swsales_ajax_tracking', array( __CLASS__, 'ajax_tracking' ) ); + add_action( 'wp_ajax_swsales_stats_csv', array( __CLASS__, 'stats_csv' ) ); } public static function add_reports_page() { @@ -28,6 +29,37 @@ public static function add_reports_page() { ); } + /** + * Handles the Sales Export + */ + public static function stats_csv() { + require_once( SWSALES_DIR . "/adminpages/report-csv.php"); + exit; + } + + /** + * Gets a $csv_export_link for a sitewide sale. + * + * @param SWSales_Sitewide_Sale $sitewide_sale to get link for. + * @return string $csv_export_link. + * + * @since 1.4 + */ + public static function build_CSV_report_link($sitewide_sale) { + // Bail if param is not correct. + if ( ! is_a( $sitewide_sale, 'Sitewide_Sales\classes\SWSales_Sitewide_Sale' ) ) { + return; + } + $csv_export_link = add_query_arg( + array( + 'action' => 'swsales_stats_csv', + 'sitewide_sale' => $sitewide_sale->get_id(), + ), + admin_url( 'admin-ajax.php' ) ); + + return $csv_export_link; + } + public static function show_reports_page() { ?>

@@ -42,35 +74,68 @@ public static function show_reports_page() { ?> ); // Choose sale to show. - $sale_to_show = null; + $sales_to_show = array(); if ( isset( $_REQUEST['sitewide_sale'] ) ) { - $sale_to_show = SWSales_Sitewide_Sale::get_sitewide_sale( $_REQUEST['sitewide_sale'] ); + if ( ! is_array( $_REQUEST['sitewide_sale'] ) ) { + $_REQUEST['sitewide_sale'] = array( $_REQUEST['sitewide_sale'] ); // Sanitized below. + } + + foreach ($_REQUEST['sitewide_sale'] as $key => $value) { + if ( ! empty( $value ) ) { + $sales_to_show[] = SWSales_Sitewide_Sale::get_sitewide_sale( (int)$value ); + } + } } - if ( null === $sale_to_show ) { - $sale_to_show = SWSales_Sitewide_Sale::get_active_sitewide_sale(); + if ( empty( $sales_to_show ) && ! empty( SWSales_Sitewide_Sale::get_active_sitewide_sale() ) ) { + $sales_to_show[] = SWSales_Sitewide_Sale::get_active_sitewide_sale(); } - // Select field to choose a sitewide sale. + // Show dropdown to choose sale to show. if ( ! empty ( $all_sitewide_sales ) ) { ?>
- - + + + + + + - + ?> +
-
+
Create your first Sitewide Sale »', 'sitewide-sales' ), admin_url( 'post-new.php?post_type=sitewide_sale' ) ); ?>
@@ -78,105 +143,196 @@ public static function show_reports_page() { ?> } // Show report for sitewide sale if applicable. - if ( null !== $sale_to_show ) { - SWSales_Reports::show_report( $sale_to_show ); - } + SWSales_Reports::show_report( $sales_to_show ); ?> -
-

-

- get_start_date() ), - esc_html( $sitewide_sale->get_end_date() ) - ); - ?> -

-
-
-
-

get_banner_impressions() ); ?>

-

-
-
-

get_landing_page_visits() ); ?>

-

- Landing Page Visits', 'sitewide-sales' ), - get_permalink( $sitewide_sale->get_landing_page_post_id() ), - get_the_title( $sitewide_sale->get_landing_page_post_id() ) - ); - ?> -

-
-
-

get_checkout_conversions() ); ?>

-

- -

-
-
-

get_revenue() ); ?>

-

-
-
- get_start_date( 'Y-m-d' ) ), - new \DateInterval('P1D'), - new \DateTime( $sitewide_sale->get_end_date( 'Y-m-d' ) . ' + 1 day' ) - ); - foreach ($period as $key => $value) { - $date_array_all[ $value->format('Y-m-d') ] = 0.0; + + // Bail if given elements aren't SWSales_Sitewide_Sale objects. + foreach ( $sitewide_sales as $sitewide_sale ) { + if ( ! is_a( $sitewide_sale, 'Sitewide_Sales\classes\SWSales_Sitewide_Sale' ) ) { + return; } + } + ?> +
+

+
get_hide_on_checkout(), 1 ); ?>>

- -
+ + +

+
+ + + + + + + + + + + $sitewide_sale ) { + $diff_rate = null; + if ( count( $sitewide_sales ) > 1 && $key === 0 ) { + // This value is already escaped in the build_rate_markup() function. + $diff_rate = self::build_diff_rate_array( $sitewide_sale, $sitewide_sales[1] ); + } + ?> + + + + + + + + get_daily_sale_revenue(); - /** - * Filter the number of days shown in the report chart. Defauly is 31 days. - */ - $daily_revenue_chart_days = (int) apply_filters( 'swsales_daily_revenue_chart_days', '31' ); - $date_array = array_slice( $date_array_all, ( $daily_revenue_chart_days * -1 ), $daily_revenue_chart_days, true ); + /** + * Filter the number of days shown in the report chart. Default is 21 days. + * Since this is the compare report, let's show the first x days instead of the most recent. + */ + $daily_revenue_chart_days = (int) apply_filters( 'swsales_daily_revenue_chart_days', '21' ); + if ( count( $daily_revenue_chart_data ) > $daily_revenue_chart_days ) { + // Slice the array to only show the first x days. + $daily_revenue_chart_data = array_slice( $daily_revenue_chart_data, 0, $daily_revenue_chart_days, true ); + $data_sliced = true; + } + + // If this sale has the most days, save the number of days. + if ( count( $daily_revenue_chart_data ) > $max_sale_days ) { + $max_sale_days = count( $daily_revenue_chart_data ); + } + + // Save this data to be displayed. + $daily_chart_data[$sitewide_sale->get_id()] = $daily_revenue_chart_data; + } ?> + +
+ +
+ get_start_date() ), + esc_html( $sitewide_sale->get_end_date() ) + ); + ?> + get_start_date('Y-m-d'); + $end_date = $sitewide_sale->get_end_date('Y-m-d'); + + $start_date = date_create($start_date); + $end_date = date_create($end_date); + + // Calculate the date difference + $interval = $start_date->diff($end_date); + echo esc_html( sprintf( _n( '(%s Day)', '(%s Days)', $interval->days, 'sitewide-sales' ), number_format_i18n( $interval->days ) ) ); + ?> +
+ +
+
+ get_banner_impressions() ) ); + if ( ! empty( $diff_rate ) ) { + echo $diff_rate['banner_impressions']; + } + ?> +
+
+
+ get_landing_page_visits(); + echo esc_html( number_format_i18n( $landing_page_visits ) ); + if ( ! empty( $diff_rate ) ) { + echo $diff_rate['landing_page_visits']; + } + ?> +
+ get_landing_page_post_id() ) ) { + echo ''; + } + ?> +
+
+ get_checkout_conversions() ) ); + if ( ! empty( $diff_rate ) ) { + echo $diff_rate['checkout_conversions']; + } + ?> +
+
+ +
+
+
+ get_sale_revenue(true) ); + if ( ! empty( $diff_rate ) ) { + echo $diff_rate['revenue']; + } + ?> +
+
+ + 1 ) { + // We have a comparison sale. Set up an array of sale data without dates. + $comparison_sale_array_key = array_key_last( $daily_chart_data ); + $comparison_sale_chart_data = array(); + foreach ( $daily_chart_data[$comparison_sale_array_key] as $date => $value ) { + $comparison_sale_chart_data[] = $value; + } + } - // Get the best day to highlight in the chart. - $highest_daily_revenue = max( $daily_revenue_chart_data ); + // Get the best day for primary sale to highlight in the chart. + $highest_daily_revenue = max( $primary_sale_chart_data ); if ( $highest_daily_revenue > 0 ) { - $highest_daily_revenue_key = array_search( $highest_daily_revenue, $daily_revenue_chart_data ); + $highest_daily_revenue_key = array_search( $highest_daily_revenue, $primary_sale_chart_data ); } // Display the chart. - if ( is_array( $daily_revenue_chart_data ) ) { ?> -
-
-
- $daily_revenue_chart_days ) { ?> -

+ if ( is_array( $primary_sale_chart_data ) ) { ?> +
+

+ +
-

+
+
+ ?> +
+

+ + + + + + + + + + + + get_sale_revenue(false); + $sitewide_sale_other_revenue_raw = $sitewide_sale->get_other_revenue(false); + $sitewide_sale_renewal_revenue_raw = $sitewide_sale->get_renewal_revenue(false); + $sitewide_sale_total_revenue_raw = $sitewide_sale->get_total_revenue(false); + ?> + + + + + + + + + +
+ +
+ get_start_date() ), + esc_html( $sitewide_sale->get_end_date() ) + ); + ?> + get_start_date('Y-m-d'); + $end_date = $sitewide_sale->get_end_date('Y-m-d'); + + $start_date = date_create($start_date); + $end_date = date_create($end_date); + + // Calculate the date difference + $interval = $start_date->diff($end_date); + echo esc_html( sprintf( _n( '(%s Day)', '(%s Days)', $interval->days, 'sitewide-sales' ), number_format_i18n( $interval->days ) ) ); + ?> +
+
+
+ get_sale_revenue(true) ); ?> +
+ 0 ) { ?> +
+ +
+ +
+
+ get_other_revenue(true) ); ?> +
+ 0 ) { ?> +
+ +
+ +
+
+ get_renewal_revenue(true) ); ?> +
+ 0 ) { ?> +
+ +
+ +
+
+ get_total_revenue(true) ); ?> +
+
- get_banner_impressions() ); ?> + get_banner_impressions() ); ?>
- get_landing_page_visits() ); ?> + get_landing_page_visits() ); ?>
- get_checkout_conversions() ); ?> + get_checkout_conversions() ); ?>
- get_revenue() ); ?> + get_sale_revenue(true) ); ?>
id, $screens_to_load_on ) ) { wp_enqueue_script( 'corechart', plugins_url( 'js/corechart.js', SWSALES_BASENAME ) ); } @@ -323,13 +587,29 @@ public static function admin_enqueue_scripts() { * Setup JS vars and enqueue our JS for tracking user behavior */ public static function enqueue_tracking_js() { - $active_sitewide_sale = SWSales_Sitewide_Sale::get_active_sitewide_sale(); + // If the user is an admin and the URL has a preview sale defined, return that sale as active. + if ( current_user_can( 'administrator' ) && isset( $_REQUEST['swsales_preview_sale_banner'] ) ) { + $active_sitewide_sale = SWSales_Sitewide_Sale::get_sitewide_sale( intval( $_REQUEST['swsales_preview_sale_banner'] ) ); + $preview = true; + } else { + // Otherwise, try to get the current defined active sale via settings. + $active_sitewide_sale = SWSales_Sitewide_Sale::get_active_sitewide_sale(); + } + + // No active sale or previewed sale? Return. if ( null === $active_sitewide_sale ) { return; } + // Is the active or previewed sale not running? Return. + if ( ! $active_sitewide_sale->is_running() ) { + return; + } + + // Register our tracking script. wp_register_script( 'swsales_tracking', plugins_url( 'js/swsales.js', SWSALES_BASENAME ), array( 'jquery', 'utils' ) ); + // Set our JS vars. $landing_page_post_id = $active_sitewide_sale->get_landing_page_post_id(); $swsales_data = array( 'landing_page' => ! empty( $landing_page_post_id ) && is_page( $landing_page_post_id ), @@ -338,6 +618,7 @@ public static function enqueue_tracking_js() { 'ajax_url' => admin_url( 'admin-ajax.php' ), ); + // Localize and enqueue our tracking script. wp_localize_script( 'swsales_tracking', 'swsales', $swsales_data ); wp_enqueue_script( 'swsales_tracking' ); } @@ -366,4 +647,72 @@ public static function ajax_tracking() { echo 'Invalid Report. '; return; } + + /** + * Given 2 SWSales_Sitewide_Sale objects, returns an array with the difference rate between them over several attributes. + * + * @param SWSales_Sitewide_Sale $sitewide_sale_1 A SWSales_Sitewide_Sale. + * @param SWSales_Sitewide_Sale $sitewide_sale_2 A SWSales_Sitewide_Sale. + * @return an Array with the markup representing difference rate between them over several attributes. + * + * @since 1.4 + */ + private static function build_diff_rate_array($sitewide_sale_1, $sitewide_sale_2) { + // No need to validate params, we did it before. + $diff_rate = []; + + $attributes = [ + 'banner_impressions' => 'get_banner_impressions', + 'landing_page_visits' => 'get_landing_page_visits', + 'checkout_conversions' => 'get_checkout_conversions', + 'revenue' => 'get_sale_revenue', + ]; + + foreach ($attributes as $key => $method) { + $value_1 = (float)$sitewide_sale_1->$method(); + $value_2 = (float)$sitewide_sale_2->$method(); + + if ( $value_1 == $value_2 ) { + // No change. + $diff_rate[$key] = ''; + } elseif ( empty( $value_2 ) ) { + // Avoid divide by 0. + $diff_rate[$key] = self::build_rate_markup( 0, true ); + } elseif ($value_1 > $value_2) { + // Growth. + $diff = round( ( ( $value_1 - $value_2 ) / $value_2 ) * 100, 2 ); + $diff_rate[$key] = self::build_rate_markup($diff, true); + } else { + // Decline. + $diff = round( ( ( $value_2 - $value_1 ) / $value_2 ) * 100, 2 ); + $diff_rate[$key] = self::build_rate_markup($diff, false); + } + } + + // This value is already escaped in the build_rate_markup() function. + return $diff_rate; + } + + /** + * Given a rate and a boolean indicating if it's a growth or decline, returns the markup representing the rate. + * + * @param Obj can be a float or a String $rate The rate to represent. + * @param Boolean $is_growth Indicates if the rate is a growth or decline. + * @return String with the markup representing the rate. + * + * @since 1.4 + */ + private static function build_rate_markup( $rate, $is_growth ) { + $dash_class = $is_growth ? 'dashicons-arrow-up-alt2' : 'dashicons-arrow-down-alt2'; + $span_class = $is_growth ? 'swsales_growth' : 'swsales_decline'; + + $dash_class = esc_attr( $dash_class ); + $span_class = esc_attr( $span_class ); + + if ( empty( $rate ) ) { + return ''; + } + + return '' . esc_html( $rate ) . '%'; + } } diff --git a/classes/class-swsales-setup.php b/classes/class-swsales-setup.php index 88912ec..e3b19d4 100644 --- a/classes/class-swsales-setup.php +++ b/classes/class-swsales-setup.php @@ -123,8 +123,10 @@ public static function swsales_plugin_action_links( $links ) { $new_links = array( '' . __( 'View Sitewide Sales', 'sitewide-sales' ) . '', ); + + $links = array_merge( $new_links, $links ); } - return array_merge( $new_links, $links ); + return $links; } /** diff --git a/classes/class-swsales-sitewide-sale.php b/classes/class-swsales-sitewide-sale.php index c131170..d034dd4 100644 --- a/classes/class-swsales-sitewide-sale.php +++ b/classes/class-swsales-sitewide-sale.php @@ -174,7 +174,8 @@ public function get_id() { * @return string */ public function get_name() { - return $this->name; + $sale_name = $this->name ? $this->name : __( '(no title)', 'sitewide-sales' ); + return $sale_name; } /** @@ -455,6 +456,36 @@ public function is_active_sitewide_sale() { return $this->is_active_sitewide_sale; } + /** + * Whether the current sitewide sale should be hidden. + * + * @return string + */ + public function hide_sale() { + // Assume sale is visible to everyone. + $hide_sale = false; + + // Get the meta value for roles this sale should be hidden for. + $hide_for_roles = json_decode( $this->get_meta_value( 'swsales_hide_for_roles', '' ) ); + + // If the hidden roles is an empty string, convert to an array. + $hide_for_roles = empty( $hide_for_roles ) ? array() : $hide_for_roles; + + // Get the current user roles or if logged out, set the 'ghost' role. + if ( ! is_user_logged_in() ) { + $user_roles = array( 'logged_out' ); + } else { + $user = wp_get_current_user(); + $user_roles = ( array ) $user->roles; + } + // If this sale is hidden by role, check if the current user should see it. + if ( ! empty( $hide_for_roles ) && ! empty( array_intersect( $hide_for_roles, $user_roles ) ) ) { + $hide_sale = true; + } + + return apply_filters( 'swsales_hide', $hide_sale, $this ); + } + /** * Returns the number of times this sale's banner has been shown to unique users. * @@ -527,6 +558,22 @@ public function __get( $key ) { * @return boolean */ public function is_running() { + // Don't check if the sale is hidden in the admin. + if ( is_admin() ) { + return ( $this->is_active_sitewide_sale() && 'sale' === $this->get_time_period() ); + } + + // Allow admins to preview the sale period and banners. + // This logic shows banner or landing page content regardless of whether sale is 'active' or in the 'sale' period. + if ( current_user_can( 'administrator' ) && ( isset( $_REQUEST['swsales_preview_time_period'] ) || isset( $_REQUEST['swsales_preview_sale_banner'] ) ) ) { + return true; + } + + // If the sale is hidden for this user, return. + if ( $this->hide_sale()) { + return; + } + return ( $this->is_active_sitewide_sale() && 'sale' === $this->get_time_period() ); } @@ -538,22 +585,89 @@ public function is_running() { /** * Returns the number of checkouts which used the sale's discount code/coupon. - * Must be filtered by the sale's module, otherwise just shows N/A. + * Must be filtered by the sale's module. * - * @return string + * @param bool formatted whether to format the revenue. + * @return string number of checkouts using sale code. */ - public function get_checkout_conversions() { - return apply_filters( 'swsales_get_checkout_conversions', 'N/A', $this ); + public function get_checkout_conversions($formatted = false) { + return apply_filters( 'swsales_get_checkout_conversions', '0', $this, $formatted ); } /** * Returns the revenue generated during the sale period. - * Must be filtered by the sale's module, otherwise just shows N/A. + * Must be filtered by the sale's module. * - * @return string + * @param bool formatted whether to format the revenue. + * @return string revenue from sale. + * + * @since 1.4 + */ + public function get_sale_revenue($formatted = false) { + return apply_filters( 'swsales_get_revenue', '—', $this, $formatted ); + } + + /** + * Returns the revenue generated during the sale period from sales using the sale's discount code/coupon. + * Must be filtered by the sale's module. + * + * @param bool formatted whether to format the revenue. + * @return string revenue from sale code. + * + * @since 1.4 */ - public function get_revenue() { - return apply_filters( 'swsales_get_revenue', 'N/A', $this ); + public function get_other_revenue($formatted = false) { + return apply_filters( 'swsales_get_other_revenue', '—', $this, $formatted ); + } + + /** + * Return revenue from renewals during the sale period. + * Must be filtered by the sale's module. + * + * @param bool formatted whether to format the revenue. + * @return string revenue from renewals. + * + * @since 1.4 + */ + public function get_renewal_revenue($formatted = false) { + return apply_filters( 'swsales_get_renewal_revenue', '—', $this, $formatted ); + } + + /** + * Gets total revenue from the sale period. + * + * @param bool formatted whether to format the revenue. + * @return string total revenue + * + * @since 1.4 + */ + public function get_total_revenue($formatted = false) { + return apply_filters( 'swsales_get_total_revenue', '—', $this, $formatted ); + } + + /** + * Gets an array with revenue by day. + * + * @param bool formatted whether to format the revenue. + * @return array revenue by day + * + * @since 1.4 + */ + public function get_daily_sale_revenue() { + // Daily Revenue Chart. + // Build an array with each day of sale as a key to store revenue data in. + $date_array_all = array(); + $period = new \DatePeriod( + new \DateTime( $this->get_start_date( 'Y-m-d' ) ), + new \DateInterval('P1D'), + new \DateTime( $this->get_end_date( 'Y-m-d' ) . ' + 1 day' ) + ); + foreach ($period as $key => $value) { + $date_array_all[ $value->format('Y-m-d') ] = 0.0; + } + + // Get revenue data from module. + return apply_filters( 'swsales_daily_revenue_chart_data', $date_array_all, $this ); } /** diff --git a/css/admin.css b/css/admin.css index 40b3374..8495100 100644 --- a/css/admin.css +++ b/css/admin.css @@ -1,16 +1,175 @@ /** - * Colors - * - red: #c93e2c - * - dark blue: #0c3d54 - * - medium blue: #44738d - * - light blue: #6991ac - * - grey: #E7E9EF; + * Root variables */ + :root { + --sws-border-color: #E5E7EB; + --sws-border-radius: 6px; + --sws-box-shadow: 1px 2px 3px #12196110; + --sws-color-blue-dark-transparent: #0C3D5499; + --sws-color-red: #C93E2C; + --sws-color-green: #00AA00; + --sws-color-blue-dark: #0C3D54; + --sws-color-blue-medium: #0C3D54; + --sws-color-blue-light: #6991AC; + --sws-color-blue-lightest: #F5F8FA; + --sws-color-grey: #E7E9EF; + --sws-spacing-large: 50px; + --sws-spacing-medium: 30px; + --sws-spacing-small: 10px; +} + +/* General Admin Styles */ +body[class*="sitewide_sale_page_"], +body[class*="post-type-sitewide_sale"] { + background: var(--sws-color-blue-lightest); +} + +body[class*="sitewide_sale_page_"] .wrap, +body[class*="post-type-sitewide_sale"] .wrap { + padding-left: 10px; +} + +.sitewide_sales_admin h1 { + font-size: 32px; + font-weight: 700; + line-height: 1.5; + margin: var(--sws-spacing-medium) 0 var(--sws-spacing-small) 0; + padding: 0; +} + +.post-type-sitewide_sale h1.wp-heading-inline { + font-size: 32px; + font-weight: 700; + line-height: 1.5; +} + +.sitewide_sales_admin h2 { + color: var(--sws-color-blue-medium); + font-size: 28px; + font-weight: 700; + line-height: 1.5; +} + +.sitewide_sales_admin h3 { + font-size: 18px; + font-weight: 400; + line-height: 1.5; +} + +.sitewide_sales_admin p { + font-size: 14px; + line-height: 1.5; + margin: var(--sws-spacing-small) 0; +} + +.sitewide_sales_admin label { + font-size: 14px; + line-height: 1.5; +} -/* Admin Header */ +/** + * Admin Banner Area + */ .sitewide_sales_banner { background-color: #FFF; - border-bottom: 1px solid #CCC; + box-shadow: var(--sws-box-shadow); + margin-left: -20px; + padding-top: var(--sws-spacing-medium); +} + +.sitewide_sales_banner .sitewide_sales_banner_wrapper { + padding: var(--sws-spacing-small) var(--sws-spacing-medium) var(--sws-spacing-medium) var(--sws-spacing-medium); +} + +.sitewide_sales_banner .sitewide_sales_logo { + align-items: center; + display: flex; + justify-content: center; + gap: var(--sws-spacing-small); +} + +.sitewide_sales_banner .sitewide_sales_logo h1 { + margin: 0; +} + +.sitewide_sales_banner .sitewide_sales_logo a { + display: block; + width: 250px; +} + +.sitewide_sales_banner .sitewide_sales_logo img { + height: auto; + max-width: 280px; +} + +.sitewide_sales_banner .sitewide_sales_meta { + font-size: 16px; + line-height: 1.5; + text-align: center; + width: 100%; +} + +.sitewide_sales_banner .sitewide_sales_version { + background: var(--sws-color-blue-lightest); + border: 1px solid var(--sws-border-color); + color: var(--sws-color-blue-dark); + border-radius: 999px; + font-size: 14px; + font-weight: bold; + padding: 6px 12px; +} + +.sitewide_sales_banner a.swsales_license_tag { + font-weight: bold; + text-decoration: none; +} + +.sitewide_sales_banner a.swsales_license_tag:before { + display: inline-block; + font: 400 20px/1 dashicons; + left: 0; + position: relative; + text-decoration: none; + vertical-align: middle; +} + +.sitewide_sales_banner a.swsales_license_tag-valid { + color: var(--sws-color-green); +} + +.sitewide_sales_banner a.swsales_license_tag-valid:before { + content: "\f147"; +} + +.sitewide_sales_banner a.swsales_license_tag-invalid { + color: var(--sws-color-red); +} + +.sitewide_sales_banner a.swsales_license_tag-invalid:before { + content: "\f335"; +} + +.sitewide_sales_banner .sitewide_sales_meta a { + display: inline-block; + margin: 0 0 0 10px; +} + +@media only screen and (min-width: 783px) { + .sitewide_sales_banner .sitewide_sales_banner_wrapper { + align-items: center; + display: flex; + gap: calc( var(--sws-spacing-medium) / 2 ); + } + + .sitewide_sales_banner .sitewide_sales_meta { + text-align: right; + } +} + +/* +.sitewide_sales_banner { + background-color: #FFFFFF; + box-shadow: var(--sws-box-shadow); margin-left: -20px; } .sitewide_sales_banner_wrapper { @@ -63,6 +222,7 @@ .sitewide_sales_banner .sitewide_sales_meta a.swsales_license_tag-invalid:before { content: "\f335"; } +*/ .sitewide_sales_admin .sitewide_sales_icon { max-width: 200px; height: auto; @@ -76,7 +236,7 @@ border-style: solid; border-width: 0 0 0 4px; color: #3c434a; - margin-bottom: 1em; + margin-bottom: var(--sws-spacing-small); padding: 15px; } .sitewide_sales_message.sitewide_sales_success, @@ -108,6 +268,46 @@ } /* Sitewide Sales Custom Post Type */ +.post-type-sitewide_sale .widefat { + background-color: #FFF; + border: 1px solid var(--sws-border-color); + border-radius: var(--sws-border-radius); + box-shadow: var(--sws-box-shadow); + margin: var(--sws-spacing-medium) 0; +} + +.post-type-sitewide_sale .widefat thead th, +.post-type-sitewide_sale .widefat thead td { + border-bottom-color: var(--sws-border-color); +} + +.post-type-sitewide_sale .widefat tfoot th, +.post-type-sitewide_sale .widefat tfoot td { + border-top-color: var(--sws-border-color); +} + +.post-type-sitewide_sale .postbox { + background-color: #FFF; + border: 1px solid var(--sws-border-color); + border-radius: var(--sws-border-radius); + box-shadow: var(--sws-box-shadow); + overflow: hidden; +} + +.post-type-sitewide_sale .postbox .postbox-header { + border-bottom-color: var(--sws-border-color); + font-size: 18px; + font-weight: 500; +} + +.post-type-sitewide_sale #poststuff .postbox h2 { + padding: calc( var(--sws-spacing-medium) / 2 ); +} + +.post-type-sitewide_sale #poststuff .postbox .inside { + padding: 0 calc( var(--sws-spacing-medium) / 2 ) calc( var(--sws-spacing-medium) / 2 ) calc( var(--sws-spacing-medium) / 2 ); +} + .post-type-sitewide_sale #poststuff input[type=text] { width: 88%; } @@ -153,17 +353,44 @@ } /* Admin Meta Box */ -.post-type-sitewide_sale #swsales_cpt_publish_sitewide_sale .inside { +.post-type-sitewide_sale #swsales_cpt_publish_sitewide_sale.postbox .inside { margin: 0; padding: 0; } .post-type-sitewide_sale #swsales_cpt_publish_sitewide_sale .misc-pub-section { - padding: 0 1em; + padding: 0 calc( var(--sws-spacing-medium) / 2 ); } .post-type-sitewide_sale #swsales_cpt_publish_sitewide_sale .sitewide_sales_message { border-width: 0 0 4px 0; margin-bottom: 0; } +.post-type-sitewide_sale #swsales_cpt_publish_sitewide_sale #major-publishing-actions { + background-color: var(--sws-color-blue-lightest); + border-top-color: var(--sws-border-color); +} +.post-type-sitewide_sale #swsales_cpt_reports.postbox .inside { + margin-top: 0; + padding: 0; +} +.swsales_reports-quick-data-section:nth-child(odd) { + background-color: var(--sws-color-blue-lightest); +} +.swsales_reports-quick-data-section { + border-bottom: 1px solid var(--sws-border-color); + display: grid; + grid-template-columns: 2fr auto; + padding: calc( var(--sws-spacing-medium) / 2 ); +} +.swsales_reports-quick-data-label { + font-weight: bold; +} +.swsales_reports-quick-data-value { + text-align: right; +} +.swsales_reports-quick-data-action { + padding: calc( var(--sws-spacing-medium) / 2 ); + text-align: center; +} /* Documentation Meta Box */ #swsales_documentation.postbox ul li { @@ -175,21 +402,98 @@ /* Sitewide Sale Reports Styles */ .swsales_reports-box { - background: #FFF; - border: 1px solid #CCC; - margin: 2rem 0; - padding: 2rem; - text-align: center; + background-color: #FFF; + border: 1px solid var(--sws-border-color); + border-radius: var(--sws-border-radius); + box-shadow: var(--sws-box-shadow); + margin: var(--sws-spacing-medium) 0; + padding: var(--sws-spacing-medium); } + +.swsales_reports-filters { + align-items: center; + background-color: #FFF; + border: 1px solid var(--sws-border-color); + border-radius: var(--sws-border-radius); + box-shadow: var(--sws-box-shadow); + display: flex; + flex-wrap: wrap; + gap: var(--sws-spacing-small); + margin: var(--sws-spacing-small) 0; + padding: var(--sws-spacing-medium); +} + +.swsales_reports-box table { + border: 1px solid var(--sws-border-color); + border-radius: var(--sws-border-radius); + border-spacing: 0; + box-shadow: var(--sws-box-shadow); + overflow: hidden; + width: 100%; +} + +.swsales_reports-box .sale-rate { + align-items: center; + display: inline-flex; + flex-direction: row; + font-size: 14px; + margin-left: var(--sws-spacing-small); +} +.swsales_reports-box .sale-rate > * { + font-size: 14px; + line-height: 1.5; +} + +.swsales_reports-box .sale-rate .dashicons-arrow-up-alt2, +.swsales_reports-box .sale-rate.swsales_growth { + color: var(--sws-color-green); +} + +.swsales_reports-box .sale-rate.swsales_decline, +.swsales_reports-box .sale-rate .dashicons-arrow-down-alt2 { + color: var(--sws-color-red); +} + +.swsales_reports-box table thead th { + background-color: var(--sws-color-blue-lightest); + color: var(--sws-color-blue-medium); + font-weight: 600; + font-size: 14px; + padding: var(--sws-spacing-small); + text-align: left; +} + +.swsales_reports-box table tbody th, +.swsales_reports-box table tbody td { + padding: var(--sws-spacing-medium) var(--sws-spacing-small); + border-top: 1px solid var(--sws-border-color); + font-weight: normal; + text-align: left; + vertical-align: top; +} + +#swsales_overall_sale_performance.swsales_reports-box table tbody th { + padding: var(--sws-spacing-small); +} + +#swsales_overall_sale_performance.swsales_reports-box table tbody th .swsales_reports-sale-value, +#swsales_overall_sale_performance.swsales_reports-box table tbody th .swsales_reports-sale-value-description { + margin-bottom: calc( var(--sws-spacing-small) / 2 ); +} + +.swsales_reports-box .swsales_reports-sale-value { + color: var(--sws-color-blue-dark); + line-height: 1.5; + font-size: 21px; +} + .post-type-pmpro_sitewide_sale .swsales_reports-box { border: none; margin: 0; - padding: 1rem 0 0 0; + padding: var(--sws-spacing-small) 0 0 0; } -.swsales_reports-box h1.swsales_reports-box-title { - color: #999; - font-family: Georgia, Times, "Times New Roman", serif; - margin: 0; +.swsales_reports-box .swsales_reports-box-title { + margin: 0 0 var(--sws-spacing-small) 0; padding: 0; } .swsales_reports-box hr { @@ -205,12 +509,11 @@ .swsales_reports-data-4col { grid-template-columns: 1fr 1fr 1fr 1fr; } -.swsales_reports-data-section { -} -.swsales_reports-data-section h1 { - font-size: 30px; - line-height: 40px; - margin: 0; + +.swsales_reports-data-section .swsales_reports-data-value { + font-size: 28px; + font-weight: 700; + line-height: 1.5; } .swsales_reports-daily-revenue-chart { clear: both; @@ -222,10 +525,12 @@ width: 100%; } .swsales_chart_area { - background-color: #FFF; clear: both; - margin: 0 0 40px 0; - padding: 0px 10px 10px 10px; + margin: 0 0 var(--sws-spacing-medium) 0; + padding: 0 0 var(--sws-spacing-medium) 0; +} +.swsales_reports-box.swsales_chart_area h2 { + margin: var(--sws-spacing-medium) var(--sws-spacing-medium) 0 var(--sws-spacing-medium); } .swsales_chart_area rect[stroke-opacity] { stroke-width: 0 !important; @@ -236,19 +541,23 @@ margin: 0 auto; max-width: 1600px; } +.swsales_chart_description { + margin: 0 var(--sws-spacing-medium); + text-align: left; +} @media screen and (max-width: 768px) { .swsales_reports-box { - margin: 0 1rem; - padding: 1rem; + margin: 0 var(--sws-spacing-small); + padding: var(--sws-spacing-small); } .swsales_reports-box hr { - margin: .5rem 0; + margin: var(--sws-spacing-small) 0; } .swsales_reports-data { display: block; } - .swsales_reports-data-section h1, + .swsales_reports-data-section span, .swsales_reports-data-section p { display: inline-block; font-size: 18px; @@ -261,43 +570,20 @@ } } -/* Sitewide Sales About and License Page */ -#swsales_cpt_reports .inside { - margin-top: 0; - padding: 0; -} -.swsales_reports-quick-data-section:nth-child(odd) { - background: #f6f7f7; -} -.swsales_reports-quick-data-section { - border-bottom: 1px solid #dcdcde; - display: grid; - grid-template-columns: 2fr auto; - padding: 1em; -} -.swsales_reports-quick-data-label { - font-weight: bold; -} -.swsales_reports-quick-data-value { - text-align: right; -} -.swsales_reports-quick-data-action { - padding: 1em; - text-align: center; -} - /* Sitewide Sales About Page */ .swsales-wrap { - margin: 10px 40px 10px 10px; + margin: 10px 40px 10px 0; max-width: 850px; position: relative; } .swsales-wrap h2 { - margin-top: 2em; + margin-top: var(--sws-spacing-large); + margin-bottom: var(--sws-spacing-small); } .swsales-wrap p { line-height: 1.5; - font-size:16px; + font-size: 16px; + margin: 0 0 calc( var(--sws-spacing-medium) / 2 ) 0; } .sitewide_sale_page_sitewide_sales_about .swsales-wrap .sitewide_sales_icon { margin-top: 20px; @@ -312,9 +598,22 @@ text-align: left; } +.sitewide_sale_page_sitewide_sales_license hr { + margin: var(--sws-spacing-medium) 0; +} + +.sitewide_sale_page_sitewide_sales_license table.form-table { + margin: var(--sws-spacing-medium) 0; + +} +.sitewide_sale_page_sitewide_sales_license #swsales-settings-key-box td { + padding: 0; +} + .sitewide_sale_page_sitewide_sales_license img.swsales_icon{ - height:auto; - width:250px; + height: auto; + margin: 0 0 var(--sws-spacing-medium) var(--sws-spacing-medium); + width: 250px; } @media screen and (max-width: 782px) { diff --git a/includes/admin.php b/includes/admin.php index 91fc998..9470977 100644 --- a/includes/admin.php +++ b/includes/admin.php @@ -18,9 +18,12 @@ function swsales_admin_header() { ?>
- -
+ +
diff --git a/js/swsales-cpt-meta.js b/js/swsales-cpt-meta.js index ddc8207..ac71321 100644 --- a/js/swsales-cpt-meta.js +++ b/js/swsales-cpt-meta.js @@ -10,8 +10,9 @@ jQuery( document ).ready( } // multiselects - $( "#swsales_landing_page_select" ).selectWoo(); + $( "#swsales_hide_for_roles_select" ).selectWoo(); $( "#swsales_hide_banner_by_role_select" ).selectWoo(); + $( "#swsales_landing_page_select" ).selectWoo(); // removing some buttons from the edit post page for our CPT $( '.wp-editor-tabs' ).remove(); @@ -32,7 +33,10 @@ jQuery( document ).ready( $( '.swsales_shortcode_warning' ).hide(); } else { $( '#swsales_edit_landing_page' ).attr( 'href', swsales.admin_url + 'post.php?post=' + landing_page_id + '&action=edit' ); - $( '#swsales_view_landing_page' ).attr( 'href', swsales.home_url + '?p=' + landing_page_id ); + $( '#swsales_view_landing_page' ).attr( 'href', swsales.home_url + '?page_id=' + landing_page_id ); + $( '#swsales_view_landing_page_pre_sale' ).attr( 'href', swsales.home_url + '?page_id=' + landing_page_id + '&swsales_preview_time_period=pre-sale' ); + $( '#swsales_view_landing_page_sale' ).attr( 'href', swsales.home_url + '?page_id=' + landing_page_id + '&swsales_preview_time_period=sale' ); + $( '#swsales_view_landing_page_post_sale' ).attr( 'href', swsales.home_url + '?page_id=' + landing_page_id + '&swsales_preview_time_period=post-sale' ); if ( swsales.pages_with_shortcodes == null ) { swsales.pages_with_shortcodes = []; } @@ -54,6 +58,7 @@ jQuery( document ).ready( // create new landing page AJAX $( '#swsales_create_landing_page' ).click( function() { + $( '#swsales_create_landing_page' ).attr( 'disabled', 'disabled' ); var data = { 'action': 'swsales_create_landing_page', 'swsales_id': $( '#post_ID' ).val(), @@ -73,6 +78,7 @@ jQuery( document ).ready( $( '#swsales_landing_page_select' ).append( '' ); $( '#swsales_landing_page_select' ).val( response.post.ID ); swsales_toggle_landing_page(); + swsales_toggle_landing_page_settings(); } } ); diff --git a/languages/sitewide-sales.mo b/languages/sitewide-sales.mo new file mode 100644 index 0000000..b54456a Binary files /dev/null and b/languages/sitewide-sales.mo differ diff --git a/languages/sitewide-sales.po b/languages/sitewide-sales.po new file mode 100644 index 0000000..5c375de --- /dev/null +++ b/languages/sitewide-sales.po @@ -0,0 +1,1396 @@ +# Copyright (C) 2023 Stranger Studios +# This file is distributed under the GNU GPLv2+. +msgid "" +msgstr "" +"Project-Id-Version: Sitewide Sales 1.4\n" +"Report-Msgid-Bugs-To: info@strangerstudios.com\n" +"Last-Translator: Stranger Studios \n" +"Language-Team: Stranger Studios \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"POT-Creation-Date: 2023-11-16T10:19:05+00:00\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"X-Generator: WP-CLI 2.9.0\n" +"X-Domain: sitewide-sales\n" + +#. Plugin Name of the plugin +#: blocks/blocks.php:26 +#: classes/class-swsales-post-types.php:37 +#: classes/class-swsales-post-types.php:38 +#: classes/class-swsales-post-types.php:56 +#: classes/class-swsales-post-types.php:58 +#: includes/admin.php:22 +#: includes/compatibility/divi.php:24 +#: includes/compatibility/divi.php:28 +#: includes/compatibility/elementor/class-swsales-elementor.php:67 +msgid "Sitewide Sales" +msgstr "" + +#. Plugin URI of the plugin +msgid "https://sitewidesales.com" +msgstr "" + +#. Description of the plugin +msgid "Run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site." +msgstr "" + +#. Author of the plugin +msgid "Stranger Studios" +msgstr "" + +#. Author URI of the plugin +msgid "https://www.strangerstudios.com" +msgstr "" + +#: blocks/blocks.php:50 +msgid "Dashed Border" +msgstr "" + +#: blocks/blocks.php:65 +msgid "Highlight" +msgstr "" + +#: classes/class-swsales-about.php:19 +#: classes/class-swsales-about.php:20 +msgid "About" +msgstr "" + +#: classes/class-swsales-about.php:30 +msgid "About Sitewide Sales" +msgstr "" + +#: classes/class-swsales-about.php:41 +msgid "Sitewide Sales helps you run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site." +msgstr "" + +#: classes/class-swsales-about.php:42 +msgid "We currently offer integration for Paid Memberships Pro, WooCommerce, and Easy Digital Downloads." +msgstr "" + +#: classes/class-swsales-about.php:43 +msgid "There is also a custom module you can use to track performance with any other platforms you choose." +msgstr "" + +#: classes/class-swsales-about.php:44 +msgid "Getting Started" +msgstr "" + +#: classes/class-swsales-about.php:45 +msgid "This plugin handles your banners, notification bars, landing pages, and reporting. Running a sale like this used to require three or more separate plugins. Now you can run your sale with a single tool. At the same time, the Sitewide Sales plugin is flexible enough that you can use specific banner and landing page plugins if wanted." +msgstr "" + +#: classes/class-swsales-about.php:46 +msgid "Check out the Sitewide Sales documentation site for additional setup instructions, sample landing page and banner content, as well as developer documentation to further extend the templates, reporting, and integration options." +msgstr "" + +#: classes/class-swsales-about.php:48 +#: classes/class-swsales-metaboxes.php:85 +#: includes/admin.php:27 +msgid "Documentation" +msgstr "" + +#: classes/class-swsales-about.php:48 +msgid "View Support Options »" +msgstr "" + +#: classes/class-swsales-landing-pages.php:142 +#: blocks/countdown-timer/block.js:91 +msgid "Days" +msgstr "" + +#: classes/class-swsales-landing-pages.php:143 +#: blocks/countdown-timer/block.js:97 +msgid "Hours" +msgstr "" + +#: classes/class-swsales-landing-pages.php:144 +#: blocks/countdown-timer/block.js:103 +msgid "Minutes" +msgstr "" + +#: classes/class-swsales-landing-pages.php:145 +#: blocks/countdown-timer/block.js:109 +msgid "Seconds" +msgstr "" + +#: classes/class-swsales-landing-pages.php:254 +#: classes/class-swsales-landing-pages.php:291 +#: classes/class-swsales-metaboxes.php:852 +msgid "Sitewide Sale Landing Page" +msgstr "" + +#: classes/class-swsales-landing-pages.php:274 +#: classes/class-swsales-landing-pages.php:275 +#: classes/class-swsales-landing-pages.php:307 +#: classes/class-swsales-post-types.php:43 +msgid "Edit Sitewide Sale" +msgstr "" + +#: classes/class-swsales-landing-pages.php:303 +msgid "Use the Sale Content block or Sale Period Visibility setting to display content before, during, and after the sale on this landing page." +msgstr "" + +#: classes/class-swsales-license.php:23 +msgid "License" +msgstr "" + +#: classes/class-swsales-license.php:24 +msgid " Your license key can be found in your purchase confirmation email or in your account area." +msgstr "" + +#: classes/class-swsales-license.php:58 +msgid "Your license is invalid or expired." +msgstr "" + +#: classes/class-swsales-license.php:58 +msgid "Visit the account area to confirm that your account is active and to find your license key." +msgstr "" + +#: classes/class-swsales-license.php:60 +msgid "Thank you! A valid license key has been used to activate your support license on this site." +msgstr "" + +#: classes/class-swsales-license.php:68 +msgid "Enter license key here..." +msgstr "" + +#: classes/class-swsales-license.php:70 +msgid "Validate Key" +msgstr "" + +#: classes/class-swsales-license.php:104 +msgid "Sitewide Sales is distributed under the GPLv2 license. This means, among other things, that you may use the software on this site or any other site free of charge." +msgstr "" + +#: classes/class-swsales-metaboxes.php:48 +#: classes/class-swsales-metaboxes.php:497 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:237 +msgid "Draft" +msgstr "" + +#: classes/class-swsales-metaboxes.php:69 +msgid "Admin" +msgstr "" + +#: classes/class-swsales-metaboxes.php:77 +msgid "Quick Reports" +msgstr "" + +#: classes/class-swsales-metaboxes.php:93 +msgid "Start and End Dates" +msgstr "" + +#: classes/class-swsales-metaboxes.php:101 +#: classes/class-swsales-metaboxes.php:294 +#: classes/class-swsales-post-types.php:96 +msgid "Sale Type" +msgstr "" + +#: classes/class-swsales-metaboxes.php:109 +msgid "Sale Banner" +msgstr "" + +#: classes/class-swsales-metaboxes.php:117 +#: classes/class-swsales-metaboxes.php:484 +#: classes/class-swsales-post-types.php:97 +msgid "Landing Page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:183 +msgid "Set as Current Sitewide Sale" +msgstr "" + +#: classes/class-swsales-metaboxes.php:190 +#: classes/class-swsales-metaboxes.php:276 +#: classes/class-swsales-metaboxes.php:365 +#: classes/class-swsales-metaboxes.php:465 +#: classes/class-swsales-metaboxes.php:658 +msgid "Save All Settings" +msgstr "" + +#: classes/class-swsales-metaboxes.php:200 +#: classes/class-swsales-metaboxes.php:201 +msgid "About the Plugin" +msgstr "" + +#: classes/class-swsales-metaboxes.php:202 +#: classes/class-swsales-metaboxes.php:206 +#: classes/class-swsales-metaboxes.php:210 +#: classes/class-swsales-metaboxes.php:214 +#: classes/class-swsales-metaboxes.php:218 +#: classes/class-swsales-metaboxes.php:222 +#: classes/class-swsales-metaboxes.php:226 +#: classes/class-swsales-metaboxes.php:230 +msgid "(opens in a new tab)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:204 +#: classes/class-swsales-metaboxes.php:205 +msgid "Getting Started With Sitewide Sales" +msgstr "" + +#: classes/class-swsales-metaboxes.php:208 +#: classes/class-swsales-metaboxes.php:209 +msgid "Setting the Sale Start and End Date" +msgstr "" + +#: classes/class-swsales-metaboxes.php:212 +#: classes/class-swsales-metaboxes.php:213 +msgid "Choosing a Sale Type and Discount Code or Coupon" +msgstr "" + +#: classes/class-swsales-metaboxes.php:216 +#: classes/class-swsales-metaboxes.php:217 +msgid "Designing Your Sale Landing Page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:220 +#: classes/class-swsales-metaboxes.php:221 +msgid "Setting Up the Active Sales Banner" +msgstr "" + +#: classes/class-swsales-metaboxes.php:224 +#: classes/class-swsales-metaboxes.php:225 +msgid "Viewing Sitewide Sale Reports" +msgstr "" + +#: classes/class-swsales-metaboxes.php:228 +#: classes/class-swsales-metaboxes.php:229 +msgid "Extend Sitewide Sales via Action and Filter Hooks" +msgstr "" + +#: classes/class-swsales-metaboxes.php:241 +msgid "Enter title here. (For reference only.)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:254 +msgid "These fields control when the banner (if applicable) and built-in sale reporting will be active for your site. They also control what content is displayed on your sale Landing Page according to the \"Landing Page\" settings below." +msgstr "" + +#: classes/class-swsales-metaboxes.php:259 +#: blocks/countdown-timer/block.js:81 +msgid "Sale Start Date" +msgstr "" + +#: classes/class-swsales-metaboxes.php:263 +msgid "Set this date and time to when your sale should begin." +msgstr "" + +#: classes/class-swsales-metaboxes.php:267 +#: blocks/countdown-timer/block.js:80 +msgid "Sale End Date" +msgstr "" + +#: classes/class-swsales-metaboxes.php:271 +msgid "Set this date and time to when your sale should end." +msgstr "" + +#: classes/class-swsales-metaboxes.php:297 +#: classes/class-swsales-reports.php:111 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:229 +#: modules/ecommerce/edd/class-swsales-module-edd.php:109 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:114 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:231 +#: modules/ecommerce/wc/class-swsales-module-wc.php:104 +#: classes/class-swsales-reports.php:112 +msgid "- Choose One -" +msgstr "" + +#: classes/class-swsales-metaboxes.php:317 +msgid "Hide Sale by Role" +msgstr "" + +#: classes/class-swsales-metaboxes.php:324 +#: classes/class-swsales-metaboxes.php:444 +msgid "Logged Out" +msgstr "" + +#: classes/class-swsales-metaboxes.php:333 +msgid "This setting will completely hide the sale from users with the selected roles (including the banner and discount logic)." +msgstr "" + +#: classes/class-swsales-metaboxes.php:337 +msgid "Apply Discount Automatically" +msgstr "" + +#: classes/class-swsales-metaboxes.php:344 +msgid "Do not apply discount automatically." +msgstr "" + +#: classes/class-swsales-metaboxes.php:350 +msgid "Apply discount automatically if user has seen the landing page." +msgstr "" + +#: classes/class-swsales-metaboxes.php:356 +msgid "Always apply discount automatically." +msgstr "" + +#: classes/class-swsales-metaboxes.php:360 +msgid "Caching plugins may interfere with this functionality. If using caching on your site, consider never giving an automatic discount or always giving an automatic discount." +msgstr "" + +#: classes/class-swsales-metaboxes.php:384 +msgid "Banner Type" +msgstr "" + +#: classes/class-swsales-metaboxes.php:387 +msgid "- No Banner -" +msgstr "" + +#: classes/class-swsales-metaboxes.php:412 +msgid "Banner Close Behavior" +msgstr "" + +#: classes/class-swsales-metaboxes.php:415 +msgid "Close Until Refresh" +msgstr "" + +#: classes/class-swsales-metaboxes.php:416 +msgid "Close Until New Session" +msgstr "" + +#: classes/class-swsales-metaboxes.php:418 +msgid "Select when the banner will reappear if the user closes or dismisses the banner." +msgstr "" + +#: classes/class-swsales-metaboxes.php:425 +msgid "Hide Banner at Checkout" +msgstr "" + +#: classes/class-swsales-metaboxes.php:428 +msgid "Check this box to hide the banner on checkout pages." +msgstr "" + +#: classes/class-swsales-metaboxes.php:429 +msgid "Recommended: Leave checked so only users using your landing page will pay the sale price." +msgstr "" + +#: classes/class-swsales-metaboxes.php:437 +msgid "Hide Banner by Role" +msgstr "" + +#: classes/class-swsales-metaboxes.php:453 +msgid "This setting will hide the banner for users with the selected roles." +msgstr "" + +#: classes/class-swsales-metaboxes.php:487 +msgid "- No Landing Page -" +msgstr "" + +#: classes/class-swsales-metaboxes.php:524 +msgid "edit page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:526 +msgid "view page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:528 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:257 +#: modules/ecommerce/edd/class-swsales-module-edd.php:146 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:147 +#: modules/ecommerce/wc/class-swsales-module-wc.php:136 +msgid " or " +msgstr "" + +#: classes/class-swsales-metaboxes.php:531 +msgid "create a new landing page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:542 +msgid "Preview Landing Page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:545 +msgid "Select a period to preview the landing page for this sale:" +msgstr "" + +#: classes/class-swsales-metaboxes.php:547 +msgid "Before (pre-sale)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:549 +msgid "During (sale)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:551 +msgid "After (post-sale)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:576 +msgid "Edit your landing page to insert content shown before, during, or after the sale. Use the Sale Content Block to insert content in grouped sections or the Sale Period Visibility setting to toggle visibility on individual block groups." +msgstr "" + +#. translators: Strings here are button open and close tags. +#: classes/class-swsales-metaboxes.php:580 +msgid "Or, use the [sitewide_sales] shortcode on your page and %sthe legacy fields here to create a basic landing page%s." +msgstr "" + +#: classes/class-swsales-metaboxes.php:588 +msgid "Landing Page Template" +msgstr "" + +#: classes/class-swsales-metaboxes.php:591 +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:296 +msgid "None" +msgstr "" + +#: classes/class-swsales-metaboxes.php:612 +msgid "Pre-Sale Content" +msgstr "" + +#: classes/class-swsales-metaboxes.php:620 +#: blocks/sale-content/block.js:29 +msgid "Sale Content" +msgstr "" + +#: classes/class-swsales-metaboxes.php:628 +msgid "Post-Sale Content" +msgstr "" + +#: classes/class-swsales-metaboxes.php:671 +msgid "View Detailed Sale Report" +msgstr "" + +#: classes/class-swsales-metaboxes.php:727 +msgid "Sitewide Sale" +msgstr "" + +#: classes/class-swsales-metaboxes.php:841 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:355 +#: modules/ecommerce/edd/class-swsales-module-edd.php:203 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:561 +#: modules/ecommerce/wc/class-swsales-module-wc.php:193 +msgid "No sitewide sale ID given. Try doing it manually." +msgstr "" + +#: classes/class-swsales-metaboxes.php:868 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:381 +msgid "Error inserting post. Try doing it manually." +msgstr "" + +#: classes/class-swsales-page-template.php:22 +msgid "Sitewide Sale Page" +msgstr "" + +#: classes/class-swsales-post-types.php:34 +msgctxt "Post Type General Name" +msgid "Sitewide Sales" +msgstr "" + +#: classes/class-swsales-post-types.php:35 +msgctxt "Post Type Singular Name" +msgid "Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:36 +#: classes/class-swsales-post-types.php:39 +msgid "All Sitewide Sales" +msgstr "" + +#: classes/class-swsales-post-types.php:40 +msgid "Add New Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:41 +msgid "Add New" +msgstr "" + +#: classes/class-swsales-post-types.php:42 +msgid "New Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:44 +msgid "Update Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:45 +msgid "View Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:46 +msgid "Search Sitewide Sales" +msgstr "" + +#: classes/class-swsales-post-types.php:47 +msgid "Not found" +msgstr "" + +#: classes/class-swsales-post-types.php:48 +msgid "Not found in Trash" +msgstr "" + +#: classes/class-swsales-post-types.php:49 +msgid "Insert into Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:50 +msgid "Uploaded to this Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:51 +msgid "Sitewide Sales list" +msgstr "" + +#: classes/class-swsales-post-types.php:52 +msgid "Sitewide Sales list navigation" +msgstr "" + +#: classes/class-swsales-post-types.php:53 +msgid "Filter Sitewide Sales list" +msgstr "" + +#: classes/class-swsales-post-types.php:95 +msgid "Sale Date" +msgstr "" + +#: classes/class-swsales-post-types.php:98 +#: classes/class-swsales-reports.php:24 +#: classes/class-swsales-reports.php:25 +#: classes/class-swsales-reports.php:64 +#: classes/class-swsales-reports.php:65 +msgid "Reports" +msgstr "" + +#: classes/class-swsales-post-types.php:99 +msgid "Select Active Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:142 +msgid "Remove Active" +msgstr "" + +#: classes/class-swsales-post-types.php:144 +msgid "Set Active" +msgstr "" + +#: classes/class-swsales-privacy.php:21 +msgid "This sample language includes the basics around what personal data your Sitewide Sale may be collecting, storing, and sharing, as well as who may have access to that data. Depending on what settings are enabled and which integrated plugin is used, the specific information shared by your Sitewide Sale will vary. We recommend consulting with a lawyer when deciding what information to disclose on your privacy policy." +msgstr "" + +#: classes/class-swsales-privacy.php:23 +msgid "What we collect and store" +msgstr "" + +#: classes/class-swsales-privacy.php:26 +msgid "Suggested text:" +msgstr "" + +#: classes/class-swsales-privacy.php:27 +msgid "While a sale is active, we will track:" +msgstr "" + +#: classes/class-swsales-privacy.php:31 +msgid "Sale Banners you view: We store a numeric value in a cookie. This data is used to report on sale performance." +msgstr "" + +#: classes/class-swsales-privacy.php:32 +msgid "Landing pages you visit: We store a numeric value in a cookie. This data is used to report on sale performance." +msgstr "" + +#: classes/class-swsales-privacy.php:33 +msgid "Purchases you complete through a sale: We store a numeric value in a cookie. This data is used to link the purchase to the sale for reporting." +msgstr "" + +#: classes/class-swsales-privacy.php:36 +msgid "Who has access to sale information" +msgstr "" + +#: classes/class-swsales-privacy.php:37 +msgid "Administrators of our site have access to view sale reports. These reports include aggregate data that is non-personalized, including conversion rates, number of banner or landing page views, and total sale revenue data." +msgstr "" + +#: classes/class-swsales-reports.php:140 +#: classes/class-swsales-reports.php:141 +msgid "No Sitewide Sales found. Create your first Sitewide Sale »" +msgstr "" + +#: classes/class-swsales-reports.php:171 +#: classes/class-swsales-reports.php:173 +msgid "Overall Sale Performance" +msgstr "" + +#: classes/class-swsales-reports.php:176 +#: classes/class-swsales-reports.php:556 +#: classes/class-swsales-reports.php:178 +#: classes/class-swsales-reports.php:559 +msgid "Banner Reach" +msgstr "" + +#: classes/class-swsales-reports.php:177 +#: classes/class-swsales-reports.php:560 +#: classes/class-swsales-reports.php:179 +#: classes/class-swsales-reports.php:563 +msgid "Landing Page Visits" +msgstr "" + +#: classes/class-swsales-reports.php:178 +#: classes/class-swsales-reports.php:564 +#: classes/class-swsales-reports.php:180 +#: classes/class-swsales-reports.php:567 +msgid "Conversions" +msgstr "" + +#: classes/class-swsales-reports.php:179 +#: classes/class-swsales-reports.php:341 +#: classes/class-swsales-reports.php:459 +#: classes/class-swsales-reports.php:568 +#: classes/class-swsales-reports.php:181 +#: classes/class-swsales-reports.php:344 +#: classes/class-swsales-reports.php:462 +#: classes/class-swsales-reports.php:571 +msgid "Sale Revenue" +msgstr "" + +#: classes/class-swsales-reports.php:214 +#: classes/class-swsales-reports.php:495 +#: classes/class-swsales-reports.php:217 +#: classes/class-swsales-reports.php:498 +msgid "(%s Day)" +msgid_plural "(%s Days)" +msgstr[0] "" +msgstr[1] "" + +#: classes/class-swsales-reports.php:217 +#: classes/class-swsales-reports.php:220 +msgid "Export to CSV" +msgstr "" + +#: classes/class-swsales-reports.php:243 +#: classes/class-swsales-reports.php:246 +msgid "Landing Page Visit" +msgid_plural "Landing Page Visits" +msgstr[0] "" +msgstr[1] "" + +#: classes/class-swsales-reports.php:261 +#: classes/class-swsales-reports.php:264 +msgid "Checkout Conversions" +msgstr "" + +#: classes/class-swsales-reports.php:326 +#: classes/class-swsales-reports.php:329 +msgid "Sale Revenue By Day" +msgstr "" + +#: classes/class-swsales-reports.php:329 +#: classes/class-swsales-reports.php:332 +msgid "This chart shows the last %s days of sale performance." +msgstr "" + +#: classes/class-swsales-reports.php:340 +#: classes/class-swsales-reports.php:343 +msgid "DAY" +msgstr "" + +#: classes/class-swsales-reports.php:345 +#: classes/class-swsales-reports.php:348 +msgid "Comparison Sale Revenue" +msgstr "" + +#: classes/class-swsales-reports.php:365 +#: classes/class-swsales-reports.php:368 +msgid "Best Day" +msgstr "" + +#: classes/class-swsales-reports.php:367 +#: classes/class-swsales-reports.php:370 +msgid "Today" +msgstr "" + +#: classes/class-swsales-reports.php:454 +#: classes/class-swsales-reports.php:457 +msgid "Revenue Breakdown" +msgstr "" + +#: classes/class-swsales-reports.php:460 +#: classes/class-swsales-reports.php:463 +msgid "Other New Revenue" +msgstr "" + +#: classes/class-swsales-reports.php:461 +#: classes/class-swsales-reports.php:464 +msgid "Renewals" +msgstr "" + +#: classes/class-swsales-reports.php:462 +#: classes/class-swsales-reports.php:465 +msgid "Total Revenue in Period" +msgstr "" + +#: classes/class-swsales-setup.php:103 +msgid "Thank you for activating. You can view your Sitewide Sales here." +msgstr "" + +#: classes/class-swsales-setup.php:105 +msgid "Thank you for activating. You can create your first Sitewide Sale here." +msgstr "" + +#: classes/class-swsales-setup.php:124 +msgid "View Sitewide Sales" +msgstr "" + +#: classes/class-swsales-setup.php:141 +msgid "View Documentation" +msgstr "" + +#: classes/class-swsales-setup.php:141 +msgid "Docs" +msgstr "" + +#: classes/class-swsales-setup.php:142 +msgid "Visit Customer Support Forum" +msgstr "" + +#: classes/class-swsales-setup.php:142 +msgid "Support" +msgstr "" + +#: classes/class-swsales-sitewide-sale.php:177 +msgid "(no title)" +msgstr "" + +#: includes/admin.php:23 +msgid "Sitewide Sales(c) - All Rights Reserved" +msgstr "" + +#: includes/admin.php:28 +msgid "Get Support" +msgstr "" + +#: includes/admin.php:30 +msgid "Valid License" +msgstr "" + +#: includes/admin.php:32 +msgid "No License" +msgstr "" + +#: includes/compatibility/divi.php:39 +msgid "Restrict Row by Sale Period" +msgstr "" + +#: includes/compatibility/divi.php:40 +#: includes/compatibility/divi.php:56 +msgid "Enter a sale period from these options: \"pre-sale\", \"sale\", and \"post-sale\"." +msgstr "" + +#: includes/compatibility/divi.php:55 +msgid "Restrict Section by Sale Period" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:28 +#: blocks/sale-content/block.js:58 +msgid "Sale Period" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:38 +#: blocks/sale-content/block.js:63 +#: blocks/sale-period-setting/block.js:56 +msgid "Always" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:39 +#: blocks/sale-content/block.js:64 +#: blocks/sale-period-setting/block.js:57 +msgid "Before Sale" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:40 +#: blocks/sale-content/block.js:65 +#: blocks/sale-period-setting/block.js:58 +msgid "During Sale" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:41 +#: blocks/sale-content/block.js:66 +#: blocks/sale-period-setting/block.js:59 +msgid "After Sale" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:44 +#: blocks/sale-content/block.js:61 +#: blocks/sale-period-setting/block.js:54 +msgid "Select the sale period this content is visible for." +msgstr "" + +#: includes/license.php:171 +msgid "Your Sitewide Sales license key is invalid or expired." +msgstr "" + +#: includes/license.php:173 +msgid "Enter your Sitewide Sales license key." +msgstr "" + +#: includes/license.php:176 +msgid "A license key is required to receive automatic updates and support." +msgstr "" + +#: includes/license.php:177 +msgid "More Info" +msgstr "" + +#: includes/license.php:177 +msgid "Dismiss" +msgstr "" + +#: includes/license.php:426 +msgid "Important: This plugin requires a valid Sitewide Sales license key to update." +msgstr "" + +#: includes/license.php:479 +msgid "You must have a valid Sitewide Sales License Key to update Sitewide Sales. The following plugins will not be updated:" +msgstr "" + +#: includes/license.php:499 +msgid "You must have a valid Sitewide Sales License Key to update Sitewide Salses." +msgstr "" + +#: includes/license.php:519 +msgid "You must enter a valid Sitewide Sales License Key under Sitewide Sales > License to update this plugin." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:188 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:223 +msgid "Reusable Block" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:245 +msgid "No Blocks Found" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:254 +msgid "edit block" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:255 +msgid "save and preview" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:260 +msgid "create a new reusable block" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:265 +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:277 +msgid "Banner Location" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:329 +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:479 +msgid "Bottom Right of Site" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:333 +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:491 +msgid "Bottom of Site" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:366 +msgid "Sitewide Sale Reusable Block Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:402 +msgid "Sale Banners" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:410 +msgid "Fancy Coupon Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:411 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:422 +msgctxt "Block pattern description" +msgid "Sale callout with bright background, coupon code highlight, and a button to start shopping." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:421 +msgid "Fancy Coupon Popup" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:432 +msgid "Gradient Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:433 +msgctxt "Block pattern description" +msgid "Sale callout with gradient background, heading, text, and a call-to-action button displayed in two lines, vertically aligned." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:443 +msgid "Gradient Popup" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:444 +msgctxt "Block pattern description" +msgid "Sale callout with gradient background, heading, text, and a call-to-action button stacked for a popup display." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:454 +msgid "Clean Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:455 +msgctxt "Block pattern description" +msgid "Simple sale banner with light background and black text, and a call-to-action link." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:465 +msgid "Clean Popup" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:466 +msgctxt "Block pattern description" +msgid "Simple sale popup with light background and black text, and a call-to-action link." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:476 +msgid "Dark Mode Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:477 +msgctxt "Block pattern description" +msgid "Inverted banner with a calendar emoji, dark background, light text, and a red CTA button." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:487 +msgid "Dark Mode Popup" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:488 +msgctxt "Block pattern description" +msgid "Inverted popup with a calendar emoji, dark background, light text, and a red CTA button." +msgstr "" + +#: modules/banner/pum/class-swsales-banner-module-pum.php:120 +msgid "Popup" +msgstr "" + +#: modules/banner/pum/class-swsales-banner-module-pum.php:130 +msgid "Select a Popup Maker popup to use for this sale." +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:249 +msgid "Custom Banner" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:288 +msgid "Save and Preview" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:289 +msgid "Optionally display a banner, which you can customize using additional settings below, to advertise your sale." +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:293 +msgid "Banner Template" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:306 +msgid "Banner Title" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:309 +msgid "A brief title for your sale, such as the holiday or purpose of the sale. (i.e. \"Limited Time Offer\")" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:313 +msgid "Banner Text" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:316 +msgid "A brief message about your sale. (i.e. \"Save 50% on membership through December.\")" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:320 +msgid "Button Text" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:323 +msgid "The text displayed on the button of your banner that links to the Landing Page. If you do not set a landing page, no button will be shown." +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:330 +msgid "+ Add custom banner CSS" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:335 +msgid "Custom Banner CSS" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:338 +msgid "Optional. Use this area to add custom styles to modify the banner appearance." +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:340 +msgid "Use these selectors to alter the appearance of your banners." +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:62 +#: modules/ecommerce/wc/class-swsales-module-wc.php:101 +msgid "Coupon" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:65 +msgid "If you would like a coupon associated with your sale, you can set it up in whatever eCommerce platform you are using and enter the code here." +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:72 +msgid "Confirmation Page URL" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:75 +msgid "If you would like to track checkout conversions, enter the full URL that your users are sent to after completing checkout." +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:82 +msgid "Average Order Value" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:85 +msgid "If you would like to estimate the revenue generated by your sale, enter the average sale price of each order." +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:178 +msgid "N/A" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:191 +msgid "US Dollars ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:193 +msgid "Euros (€)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:198 +msgid "Pounds Sterling (£)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:202 +msgid "Argentine Peso ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:203 +msgid "Australian Dollars ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:205 +msgid "Brazilian Real (R$)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:209 +msgid "Canadian Dollars ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:210 +msgid "Chinese Yuan" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:212 +msgid "Czech Koruna" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:220 +msgid "Danish Krone" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:228 +msgid "Ghanaian Cedi (₵)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:232 +msgid "Hong Kong Dollar ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:233 +msgid "Hungarian Forint" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:234 +msgid "Indian Rupee" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:235 +msgid "Indonesia Rupiah" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:236 +msgid "Israeli Shekel" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:238 +msgid "Japanese Yen (¥)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:243 +msgid "Kenyan Shilling" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:244 +msgid "Malaysian Ringgits" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:245 +msgid "Mexican Peso ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:246 +msgid "Nigerian Naira (₦)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:247 +msgid "New Zealand Dollar ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:248 +msgid "Norwegian Krone" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:249 +msgid "Philippine Pesos" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:250 +msgid "Polish Zloty" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:252 +msgid "Romanian Leu" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:260 +msgid "Russian Ruble (₽)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:268 +msgid "Singapore Dollar ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:273 +msgid "South African Rand (R)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:278 +msgid "South Korean Won" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:281 +msgid "Swedish Krona" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:282 +msgid "Swiss Franc" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:283 +msgid "Taiwan New Dollars" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:284 +msgid "Thai Baht" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:285 +msgid "Turkish Lira" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:287 +msgid "Ukrainian Hryvnia (₴)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:295 +msgid "Vietnamese Dong" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:106 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:111 +msgid "Discount Code" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:128 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:130 +msgid "This discount code expires before the Sitewide Sale's end date." +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:130 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:132 +msgid "This discount code starts after the Sitewide Sale's start date." +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:144 +msgid "edit discount code" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:149 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:150 +msgid "create a new discount code" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:150 +msgid "Select the discount code that will be automatically applied for users when they visit your Landing Page." +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:356 +msgid "Original price" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:356 +msgid "sale price" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:397 +#: modules/ecommerce/wc/class-swsales-module-wc.php:473 +msgid "Purchases using %s" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:145 +msgid "edit code" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:151 +msgid "Select the code that will be automatically applied for users that complete an applicable membership checkout after visiting your Landing Page." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:178 +msgid "Hide Sale by Level" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:200 +msgid "This setting will completely hide the sale from users with the selected levels (including the banner and discount logic)." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:228 +msgid "Checkout Level" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:243 +msgid "Using the [pmpro_checkout] shortcode on your Landing Page will display a checkout form for this level." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:276 +msgid "Successfully migrated %d Sitewide Sale from the Sitewide Sales Add On for Paid Memberships Pro." +msgid_plural "Successfully migrated %d Sitewide Sales from the Sitewide Sales Add On for Paid Memberships Pro." +msgstr[0] "" +msgstr[1] "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:302 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:331 +msgid "Migrate Your Previous Sales Data" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:303 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:332 +msgid "We have detected data from the Sitewide Sales Add On for Paid Memberships Pro. You can migrate this data into the new Sitewide Sales plugin and maintain access to previous sales, settings, and reports. The database migration process will attempt to run in a single process, so please be patient." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:307 +msgid "Migrate PMPro Sitewide Sales Data" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:310 +msgid "Dismiss This Notice" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:336 +msgid "Migrate PMPro Sitewide Sales Data »" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:589 +msgid "Error inserting discount code. Try doing it manually." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:788 +msgid "Checkouts using %s" +msgstr "" + +#: modules/ecommerce/wc/class-swsales-module-wc.php:121 +msgid "This coupon expires on or before the Sitewide Sale's end date." +msgstr "" + +#: modules/ecommerce/wc/class-swsales-module-wc.php:134 +msgid "edit coupon" +msgstr "" + +#: modules/ecommerce/wc/class-swsales-module-wc.php:139 +msgid "create a new coupon" +msgstr "" + +#: modules/ecommerce/wc/class-swsales-module-wc.php:140 +msgid "Select the coupon that will be automatically applied for users when they visit your Landing Page." +msgstr "" + +#: blocks/countdown-timer/block.js:30 +msgid "Countdown Timer" +msgstr "" + +#: blocks/countdown-timer/block.js:31 +msgid "Add a countdown timer on your Sitewide Sale landing page that counts down to your sale start date or end date." +msgstr "" + +#: blocks/countdown-timer/block.js:39 +msgid "sale countdown" +msgstr "" + +#: blocks/countdown-timer/block.js:40 +msgid "sale timer" +msgstr "" + +#: blocks/countdown-timer/block.js:75 +msgid "Timer Ends On" +msgstr "" + +#: blocks/countdown-timer/block.js:78 +msgid "Select whether this timer counts down to the sale start date or end date." +msgstr "" + +#: blocks/sale-content/block.js:30 +msgid "Build your Sitewide Sale landing page with blocks. Place blocks within this section to conditionally show the content before, during, or after the sale." +msgstr "" + +#: blocks/sale-content/block.js:38 +msgid "sale visibility" +msgstr "" + +#: blocks/sale-content/block.js:39 +msgid "before sale" +msgstr "" + +#: blocks/sale-content/block.js:40 +msgid "after sale" +msgstr "" + +#: blocks/sale-content/block.js:41 +msgid "sale content" +msgstr "" + +#: blocks/sale-content/block.js:73 +#: blocks/sale-content/block.js:79 +msgid "Sitewide Sale Content" +msgstr "" + +#: blocks/sale-period-setting/block.js:61 +msgid "Sale Period Visibility" +msgstr "" + +#: classes/class-swsales-reports.php:103 +msgid "Show reports for" +msgstr "" + +#: classes/class-swsales-reports.php:103 +msgid "vs." +msgstr "" diff --git a/languages/sitewide-sales.pot b/languages/sitewide-sales.pot new file mode 100644 index 0000000..da6783a --- /dev/null +++ b/languages/sitewide-sales.pot @@ -0,0 +1,1367 @@ +# Copyright (C) 2023 Stranger Studios +# This file is distributed under the GNU GPLv2+. +msgid "" +msgstr "" +"Project-Id-Version: Sitewide Sales 1.4\n" +"Report-Msgid-Bugs-To: info@strangerstudios.com\n" +"Last-Translator: Stranger Studios \n" +"Language-Team: Stranger Studios \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"POT-Creation-Date: 2023-11-16T10:19:04+00:00\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"X-Generator: WP-CLI 2.9.0\n" +"X-Domain: sitewide-sales\n" + +#. Plugin Name of the plugin +#: blocks/blocks.php:26 +#: classes/class-swsales-post-types.php:37 +#: classes/class-swsales-post-types.php:38 +#: classes/class-swsales-post-types.php:56 +#: classes/class-swsales-post-types.php:58 +#: includes/admin.php:22 +#: includes/compatibility/divi.php:24 +#: includes/compatibility/divi.php:28 +#: includes/compatibility/elementor/class-swsales-elementor.php:67 +msgid "Sitewide Sales" +msgstr "" + +#. Plugin URI of the plugin +msgid "https://sitewidesales.com" +msgstr "" + +#. Description of the plugin +msgid "Run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site." +msgstr "" + +#. Author of the plugin +msgid "Stranger Studios" +msgstr "" + +#. Author URI of the plugin +msgid "https://www.strangerstudios.com" +msgstr "" + +#: adminpages/report-csv.php:4 +#: classes/class-swsales-license.php:35 +msgid "You do not have permissions to perform this action." +msgstr "" + +#: blocks/blocks.php:50 +msgid "Dashed Border" +msgstr "" + +#: blocks/blocks.php:65 +msgid "Highlight" +msgstr "" + +#: classes/class-swsales-about.php:19 +#: classes/class-swsales-about.php:20 +msgid "About" +msgstr "" + +#: classes/class-swsales-about.php:30 +msgid "About Sitewide Sales" +msgstr "" + +#: classes/class-swsales-about.php:41 +msgid "Sitewide Sales helps you run Black Friday, Cyber Monday, or other flash sales on your WordPress-powered eCommerce or membership site." +msgstr "" + +#: classes/class-swsales-about.php:42 +msgid "We currently offer integration for Paid Memberships Pro, WooCommerce, and Easy Digital Downloads." +msgstr "" + +#: classes/class-swsales-about.php:43 +msgid "There is also a custom module you can use to track performance with any other platforms you choose." +msgstr "" + +#: classes/class-swsales-about.php:44 +msgid "Getting Started" +msgstr "" + +#: classes/class-swsales-about.php:45 +msgid "This plugin handles your banners, notification bars, landing pages, and reporting. Running a sale like this used to require three or more separate plugins. Now you can run your sale with a single tool. At the same time, the Sitewide Sales plugin is flexible enough that you can use specific banner and landing page plugins if wanted." +msgstr "" + +#: classes/class-swsales-about.php:46 +msgid "Check out the Sitewide Sales documentation site for additional setup instructions, sample landing page and banner content, as well as developer documentation to further extend the templates, reporting, and integration options." +msgstr "" + +#: classes/class-swsales-about.php:48 +#: classes/class-swsales-metaboxes.php:85 +#: includes/admin.php:27 +msgid "Documentation" +msgstr "" + +#: classes/class-swsales-about.php:48 +msgid "View Support Options »" +msgstr "" + +#: classes/class-swsales-landing-pages.php:142 +#: blocks/countdown-timer/block.js:91 +msgid "Days" +msgstr "" + +#: classes/class-swsales-landing-pages.php:143 +#: blocks/countdown-timer/block.js:97 +msgid "Hours" +msgstr "" + +#: classes/class-swsales-landing-pages.php:144 +#: blocks/countdown-timer/block.js:103 +msgid "Minutes" +msgstr "" + +#: classes/class-swsales-landing-pages.php:145 +#: blocks/countdown-timer/block.js:109 +msgid "Seconds" +msgstr "" + +#: classes/class-swsales-landing-pages.php:254 +#: classes/class-swsales-landing-pages.php:291 +#: classes/class-swsales-metaboxes.php:852 +msgid "Sitewide Sale Landing Page" +msgstr "" + +#: classes/class-swsales-landing-pages.php:274 +#: classes/class-swsales-landing-pages.php:275 +#: classes/class-swsales-landing-pages.php:307 +#: classes/class-swsales-post-types.php:43 +msgid "Edit Sitewide Sale" +msgstr "" + +#: classes/class-swsales-landing-pages.php:303 +msgid "Use the Sale Content block or Sale Period Visibility setting to display content before, during, and after the sale on this landing page." +msgstr "" + +#: classes/class-swsales-license.php:23 +msgid "License" +msgstr "" + +#: classes/class-swsales-license.php:24 +msgid " Your license key can be found in your purchase confirmation email or in your account area." +msgstr "" + +#: classes/class-swsales-license.php:58 +msgid "Your license is invalid or expired." +msgstr "" + +#: classes/class-swsales-license.php:58 +msgid "Visit the account area to confirm that your account is active and to find your license key." +msgstr "" + +#: classes/class-swsales-license.php:60 +msgid "Thank you! A valid license key has been used to activate your support license on this site." +msgstr "" + +#: classes/class-swsales-license.php:68 +msgid "Enter license key here..." +msgstr "" + +#: classes/class-swsales-license.php:70 +msgid "Validate Key" +msgstr "" + +#: classes/class-swsales-license.php:104 +msgid "Sitewide Sales is distributed under the GPLv2 license. This means, among other things, that you may use the software on this site or any other site free of charge." +msgstr "" + +#: classes/class-swsales-metaboxes.php:48 +#: classes/class-swsales-metaboxes.php:497 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:237 +msgid "Draft" +msgstr "" + +#: classes/class-swsales-metaboxes.php:69 +msgid "Admin" +msgstr "" + +#: classes/class-swsales-metaboxes.php:77 +msgid "Quick Reports" +msgstr "" + +#: classes/class-swsales-metaboxes.php:93 +msgid "Start and End Dates" +msgstr "" + +#: classes/class-swsales-metaboxes.php:101 +#: classes/class-swsales-metaboxes.php:294 +#: classes/class-swsales-post-types.php:96 +msgid "Sale Type" +msgstr "" + +#: classes/class-swsales-metaboxes.php:109 +msgid "Sale Banner" +msgstr "" + +#: classes/class-swsales-metaboxes.php:117 +#: classes/class-swsales-metaboxes.php:484 +#: classes/class-swsales-post-types.php:97 +msgid "Landing Page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:183 +msgid "Set as Current Sitewide Sale" +msgstr "" + +#: classes/class-swsales-metaboxes.php:190 +#: classes/class-swsales-metaboxes.php:276 +#: classes/class-swsales-metaboxes.php:365 +#: classes/class-swsales-metaboxes.php:465 +#: classes/class-swsales-metaboxes.php:658 +msgid "Save All Settings" +msgstr "" + +#: classes/class-swsales-metaboxes.php:200 +#: classes/class-swsales-metaboxes.php:201 +msgid "About the Plugin" +msgstr "" + +#: classes/class-swsales-metaboxes.php:202 +#: classes/class-swsales-metaboxes.php:206 +#: classes/class-swsales-metaboxes.php:210 +#: classes/class-swsales-metaboxes.php:214 +#: classes/class-swsales-metaboxes.php:218 +#: classes/class-swsales-metaboxes.php:222 +#: classes/class-swsales-metaboxes.php:226 +#: classes/class-swsales-metaboxes.php:230 +msgid "(opens in a new tab)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:204 +#: classes/class-swsales-metaboxes.php:205 +msgid "Getting Started With Sitewide Sales" +msgstr "" + +#: classes/class-swsales-metaboxes.php:208 +#: classes/class-swsales-metaboxes.php:209 +msgid "Setting the Sale Start and End Date" +msgstr "" + +#: classes/class-swsales-metaboxes.php:212 +#: classes/class-swsales-metaboxes.php:213 +msgid "Choosing a Sale Type and Discount Code or Coupon" +msgstr "" + +#: classes/class-swsales-metaboxes.php:216 +#: classes/class-swsales-metaboxes.php:217 +msgid "Designing Your Sale Landing Page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:220 +#: classes/class-swsales-metaboxes.php:221 +msgid "Setting Up the Active Sales Banner" +msgstr "" + +#: classes/class-swsales-metaboxes.php:224 +#: classes/class-swsales-metaboxes.php:225 +msgid "Viewing Sitewide Sale Reports" +msgstr "" + +#: classes/class-swsales-metaboxes.php:228 +#: classes/class-swsales-metaboxes.php:229 +msgid "Extend Sitewide Sales via Action and Filter Hooks" +msgstr "" + +#: classes/class-swsales-metaboxes.php:241 +msgid "Enter title here. (For reference only.)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:254 +msgid "These fields control when the banner (if applicable) and built-in sale reporting will be active for your site. They also control what content is displayed on your sale Landing Page according to the \"Landing Page\" settings below." +msgstr "" + +#: classes/class-swsales-metaboxes.php:259 +#: blocks/countdown-timer/block.js:81 +msgid "Sale Start Date" +msgstr "" + +#: classes/class-swsales-metaboxes.php:263 +msgid "Set this date and time to when your sale should begin." +msgstr "" + +#: classes/class-swsales-metaboxes.php:267 +#: blocks/countdown-timer/block.js:80 +msgid "Sale End Date" +msgstr "" + +#: classes/class-swsales-metaboxes.php:271 +msgid "Set this date and time to when your sale should end." +msgstr "" + +#: classes/class-swsales-metaboxes.php:297 +#: classes/class-swsales-reports.php:112 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:229 +#: modules/ecommerce/edd/class-swsales-module-edd.php:109 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:114 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:231 +#: modules/ecommerce/wc/class-swsales-module-wc.php:104 +msgid "- Choose One -" +msgstr "" + +#: classes/class-swsales-metaboxes.php:317 +msgid "Hide Sale by Role" +msgstr "" + +#: classes/class-swsales-metaboxes.php:324 +#: classes/class-swsales-metaboxes.php:444 +msgid "Logged Out" +msgstr "" + +#: classes/class-swsales-metaboxes.php:333 +msgid "This setting will completely hide the sale from users with the selected roles (including the banner and discount logic)." +msgstr "" + +#: classes/class-swsales-metaboxes.php:337 +msgid "Apply Discount Automatically" +msgstr "" + +#: classes/class-swsales-metaboxes.php:344 +msgid "Do not apply discount automatically." +msgstr "" + +#: classes/class-swsales-metaboxes.php:350 +msgid "Apply discount automatically if user has seen the landing page." +msgstr "" + +#: classes/class-swsales-metaboxes.php:356 +msgid "Always apply discount automatically." +msgstr "" + +#: classes/class-swsales-metaboxes.php:360 +msgid "Caching plugins may interfere with this functionality. If using caching on your site, consider never giving an automatic discount or always giving an automatic discount." +msgstr "" + +#: classes/class-swsales-metaboxes.php:384 +msgid "Banner Type" +msgstr "" + +#: classes/class-swsales-metaboxes.php:387 +msgid "- No Banner -" +msgstr "" + +#: classes/class-swsales-metaboxes.php:412 +msgid "Banner Close Behavior" +msgstr "" + +#: classes/class-swsales-metaboxes.php:415 +msgid "Close Until Refresh" +msgstr "" + +#: classes/class-swsales-metaboxes.php:416 +msgid "Close Until New Session" +msgstr "" + +#: classes/class-swsales-metaboxes.php:418 +msgid "Select when the banner will reappear if the user closes or dismisses the banner." +msgstr "" + +#: classes/class-swsales-metaboxes.php:425 +msgid "Hide Banner at Checkout" +msgstr "" + +#: classes/class-swsales-metaboxes.php:428 +msgid "Check this box to hide the banner on checkout pages." +msgstr "" + +#: classes/class-swsales-metaboxes.php:429 +msgid "Recommended: Leave checked so only users using your landing page will pay the sale price." +msgstr "" + +#: classes/class-swsales-metaboxes.php:437 +msgid "Hide Banner by Role" +msgstr "" + +#: classes/class-swsales-metaboxes.php:453 +msgid "This setting will hide the banner for users with the selected roles." +msgstr "" + +#: classes/class-swsales-metaboxes.php:487 +msgid "- No Landing Page -" +msgstr "" + +#: classes/class-swsales-metaboxes.php:524 +msgid "edit page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:526 +msgid "view page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:528 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:257 +#: modules/ecommerce/edd/class-swsales-module-edd.php:146 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:147 +#: modules/ecommerce/wc/class-swsales-module-wc.php:136 +msgid " or " +msgstr "" + +#: classes/class-swsales-metaboxes.php:531 +msgid "create a new landing page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:542 +msgid "Preview Landing Page" +msgstr "" + +#: classes/class-swsales-metaboxes.php:545 +msgid "Select a period to preview the landing page for this sale:" +msgstr "" + +#: classes/class-swsales-metaboxes.php:547 +msgid "Before (pre-sale)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:549 +msgid "During (sale)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:551 +msgid "After (post-sale)" +msgstr "" + +#: classes/class-swsales-metaboxes.php:576 +msgid "Edit your landing page to insert content shown before, during, or after the sale. Use the Sale Content Block to insert content in grouped sections or the Sale Period Visibility setting to toggle visibility on individual block groups." +msgstr "" + +#. translators: Strings here are button open and close tags. +#: classes/class-swsales-metaboxes.php:580 +msgid "Or, use the [sitewide_sales] shortcode on your page and %sthe legacy fields here to create a basic landing page%s." +msgstr "" + +#: classes/class-swsales-metaboxes.php:588 +msgid "Landing Page Template" +msgstr "" + +#: classes/class-swsales-metaboxes.php:591 +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:296 +msgid "None" +msgstr "" + +#: classes/class-swsales-metaboxes.php:612 +msgid "Pre-Sale Content" +msgstr "" + +#: classes/class-swsales-metaboxes.php:620 +#: blocks/sale-content/block.js:29 +msgid "Sale Content" +msgstr "" + +#: classes/class-swsales-metaboxes.php:628 +msgid "Post-Sale Content" +msgstr "" + +#: classes/class-swsales-metaboxes.php:671 +msgid "View Detailed Sale Report" +msgstr "" + +#: classes/class-swsales-metaboxes.php:727 +msgid "Sitewide Sale" +msgstr "" + +#: classes/class-swsales-metaboxes.php:841 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:355 +#: modules/ecommerce/edd/class-swsales-module-edd.php:203 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:561 +#: modules/ecommerce/wc/class-swsales-module-wc.php:193 +msgid "No sitewide sale ID given. Try doing it manually." +msgstr "" + +#: classes/class-swsales-metaboxes.php:868 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:381 +msgid "Error inserting post. Try doing it manually." +msgstr "" + +#: classes/class-swsales-page-template.php:22 +msgid "Sitewide Sale Page" +msgstr "" + +#: classes/class-swsales-post-types.php:34 +msgctxt "Post Type General Name" +msgid "Sitewide Sales" +msgstr "" + +#: classes/class-swsales-post-types.php:35 +msgctxt "Post Type Singular Name" +msgid "Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:36 +#: classes/class-swsales-post-types.php:39 +msgid "All Sitewide Sales" +msgstr "" + +#: classes/class-swsales-post-types.php:40 +msgid "Add New Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:41 +msgid "Add New" +msgstr "" + +#: classes/class-swsales-post-types.php:42 +msgid "New Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:44 +msgid "Update Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:45 +msgid "View Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:46 +msgid "Search Sitewide Sales" +msgstr "" + +#: classes/class-swsales-post-types.php:47 +msgid "Not found" +msgstr "" + +#: classes/class-swsales-post-types.php:48 +msgid "Not found in Trash" +msgstr "" + +#: classes/class-swsales-post-types.php:49 +msgid "Insert into Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:50 +msgid "Uploaded to this Sitewide Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:51 +msgid "Sitewide Sales list" +msgstr "" + +#: classes/class-swsales-post-types.php:52 +msgid "Sitewide Sales list navigation" +msgstr "" + +#: classes/class-swsales-post-types.php:53 +msgid "Filter Sitewide Sales list" +msgstr "" + +#: classes/class-swsales-post-types.php:95 +msgid "Sale Date" +msgstr "" + +#: classes/class-swsales-post-types.php:98 +#: classes/class-swsales-reports.php:24 +#: classes/class-swsales-reports.php:25 +#: classes/class-swsales-reports.php:65 +msgid "Reports" +msgstr "" + +#: classes/class-swsales-post-types.php:99 +msgid "Select Active Sale" +msgstr "" + +#: classes/class-swsales-post-types.php:142 +msgid "Remove Active" +msgstr "" + +#: classes/class-swsales-post-types.php:144 +msgid "Set Active" +msgstr "" + +#: classes/class-swsales-privacy.php:21 +msgid "This sample language includes the basics around what personal data your Sitewide Sale may be collecting, storing, and sharing, as well as who may have access to that data. Depending on what settings are enabled and which integrated plugin is used, the specific information shared by your Sitewide Sale will vary. We recommend consulting with a lawyer when deciding what information to disclose on your privacy policy." +msgstr "" + +#: classes/class-swsales-privacy.php:23 +msgid "What we collect and store" +msgstr "" + +#: classes/class-swsales-privacy.php:26 +msgid "Suggested text:" +msgstr "" + +#: classes/class-swsales-privacy.php:27 +msgid "While a sale is active, we will track:" +msgstr "" + +#: classes/class-swsales-privacy.php:31 +msgid "Sale Banners you view: We store a numeric value in a cookie. This data is used to report on sale performance." +msgstr "" + +#: classes/class-swsales-privacy.php:32 +msgid "Landing pages you visit: We store a numeric value in a cookie. This data is used to report on sale performance." +msgstr "" + +#: classes/class-swsales-privacy.php:33 +msgid "Purchases you complete through a sale: We store a numeric value in a cookie. This data is used to link the purchase to the sale for reporting." +msgstr "" + +#: classes/class-swsales-privacy.php:36 +msgid "Who has access to sale information" +msgstr "" + +#: classes/class-swsales-privacy.php:37 +msgid "Administrators of our site have access to view sale reports. These reports include aggregate data that is non-personalized, including conversion rates, number of banner or landing page views, and total sale revenue data." +msgstr "" + +#: classes/class-swsales-reports.php:103 +msgid "Show reports for" +msgstr "" + +#: classes/class-swsales-reports.php:103 +msgid "vs." +msgstr "" + +#: classes/class-swsales-reports.php:141 +msgid "No Sitewide Sales found. Create your first Sitewide Sale »" +msgstr "" + +#: classes/class-swsales-reports.php:173 +msgid "Overall Sale Performance" +msgstr "" + +#: classes/class-swsales-reports.php:178 +#: classes/class-swsales-reports.php:559 +msgid "Banner Reach" +msgstr "" + +#: classes/class-swsales-reports.php:179 +#: classes/class-swsales-reports.php:563 +msgid "Landing Page Visits" +msgstr "" + +#: classes/class-swsales-reports.php:180 +#: classes/class-swsales-reports.php:567 +msgid "Conversions" +msgstr "" + +#: classes/class-swsales-reports.php:181 +#: classes/class-swsales-reports.php:344 +#: classes/class-swsales-reports.php:462 +#: classes/class-swsales-reports.php:571 +msgid "Sale Revenue" +msgstr "" + +#: classes/class-swsales-reports.php:217 +#: classes/class-swsales-reports.php:498 +msgid "(%s Day)" +msgid_plural "(%s Days)" +msgstr[0] "" +msgstr[1] "" + +#: classes/class-swsales-reports.php:220 +msgid "Export to CSV" +msgstr "" + +#: classes/class-swsales-reports.php:246 +msgid "Landing Page Visit" +msgid_plural "Landing Page Visits" +msgstr[0] "" +msgstr[1] "" + +#: classes/class-swsales-reports.php:264 +msgid "Checkout Conversions" +msgstr "" + +#: classes/class-swsales-reports.php:329 +msgid "Sale Revenue By Day" +msgstr "" + +#: classes/class-swsales-reports.php:332 +msgid "This chart shows the last %s days of sale performance." +msgstr "" + +#: classes/class-swsales-reports.php:343 +msgid "DAY" +msgstr "" + +#: classes/class-swsales-reports.php:348 +msgid "Comparison Sale Revenue" +msgstr "" + +#: classes/class-swsales-reports.php:368 +msgid "Best Day" +msgstr "" + +#: classes/class-swsales-reports.php:370 +msgid "Today" +msgstr "" + +#: classes/class-swsales-reports.php:457 +msgid "Revenue Breakdown" +msgstr "" + +#: classes/class-swsales-reports.php:463 +msgid "Other New Revenue" +msgstr "" + +#: classes/class-swsales-reports.php:464 +msgid "Renewals" +msgstr "" + +#: classes/class-swsales-reports.php:465 +msgid "Total Revenue in Period" +msgstr "" + +#: classes/class-swsales-setup.php:103 +msgid "Thank you for activating. You can view your Sitewide Sales here." +msgstr "" + +#: classes/class-swsales-setup.php:105 +msgid "Thank you for activating. You can create your first Sitewide Sale here." +msgstr "" + +#: classes/class-swsales-setup.php:124 +msgid "View Sitewide Sales" +msgstr "" + +#: classes/class-swsales-setup.php:141 +msgid "View Documentation" +msgstr "" + +#: classes/class-swsales-setup.php:141 +msgid "Docs" +msgstr "" + +#: classes/class-swsales-setup.php:142 +msgid "Visit Customer Support Forum" +msgstr "" + +#: classes/class-swsales-setup.php:142 +msgid "Support" +msgstr "" + +#: classes/class-swsales-sitewide-sale.php:177 +msgid "(no title)" +msgstr "" + +#: includes/admin.php:23 +msgid "Sitewide Sales(c) - All Rights Reserved" +msgstr "" + +#: includes/admin.php:28 +msgid "Get Support" +msgstr "" + +#: includes/admin.php:30 +msgid "Valid License" +msgstr "" + +#: includes/admin.php:32 +msgid "No License" +msgstr "" + +#: includes/compatibility/divi.php:39 +msgid "Restrict Row by Sale Period" +msgstr "" + +#: includes/compatibility/divi.php:40 +#: includes/compatibility/divi.php:56 +msgid "Enter a sale period from these options: \"pre-sale\", \"sale\", and \"post-sale\"." +msgstr "" + +#: includes/compatibility/divi.php:55 +msgid "Restrict Section by Sale Period" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:28 +#: blocks/sale-content/block.js:58 +msgid "Sale Period" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:38 +#: blocks/sale-content/block.js:63 +#: blocks/sale-period-setting/block.js:56 +msgid "Always" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:39 +#: blocks/sale-content/block.js:64 +#: blocks/sale-period-setting/block.js:57 +msgid "Before Sale" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:40 +#: blocks/sale-content/block.js:65 +#: blocks/sale-period-setting/block.js:58 +msgid "During Sale" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:41 +#: blocks/sale-content/block.js:66 +#: blocks/sale-period-setting/block.js:59 +msgid "After Sale" +msgstr "" + +#: includes/compatibility/elementor/class-swsales-elementor-content-restriction.php:44 +#: blocks/sale-content/block.js:61 +#: blocks/sale-period-setting/block.js:54 +msgid "Select the sale period this content is visible for." +msgstr "" + +#: includes/license.php:171 +msgid "Your Sitewide Sales license key is invalid or expired." +msgstr "" + +#: includes/license.php:173 +msgid "Enter your Sitewide Sales license key." +msgstr "" + +#: includes/license.php:176 +msgid "A license key is required to receive automatic updates and support." +msgstr "" + +#: includes/license.php:177 +msgid "More Info" +msgstr "" + +#: includes/license.php:177 +msgid "Dismiss" +msgstr "" + +#: includes/license.php:426 +msgid "Important: This plugin requires a valid Sitewide Sales license key to update." +msgstr "" + +#: includes/license.php:479 +msgid "You must have a valid Sitewide Sales License Key to update Sitewide Sales. The following plugins will not be updated:" +msgstr "" + +#: includes/license.php:499 +msgid "You must have a valid Sitewide Sales License Key to update Sitewide Salses." +msgstr "" + +#: includes/license.php:519 +msgid "You must enter a valid Sitewide Sales License Key under Sitewide Sales > License to update this plugin." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:188 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:223 +msgid "Reusable Block" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:245 +msgid "No Blocks Found" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:254 +msgid "edit block" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:255 +msgid "save and preview" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:260 +msgid "create a new reusable block" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:265 +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:277 +msgid "Banner Location" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:329 +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:479 +msgid "Bottom Right of Site" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:333 +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:491 +msgid "Bottom of Site" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:366 +msgid "Sitewide Sale Reusable Block Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:402 +msgid "Sale Banners" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:410 +msgid "Fancy Coupon Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:411 +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:422 +msgctxt "Block pattern description" +msgid "Sale callout with bright background, coupon code highlight, and a button to start shopping." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:421 +msgid "Fancy Coupon Popup" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:432 +msgid "Gradient Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:433 +msgctxt "Block pattern description" +msgid "Sale callout with gradient background, heading, text, and a call-to-action button displayed in two lines, vertically aligned." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:443 +msgid "Gradient Popup" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:444 +msgctxt "Block pattern description" +msgid "Sale callout with gradient background, heading, text, and a call-to-action button stacked for a popup display." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:454 +msgid "Clean Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:455 +msgctxt "Block pattern description" +msgid "Simple sale banner with light background and black text, and a call-to-action link." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:465 +msgid "Clean Popup" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:466 +msgctxt "Block pattern description" +msgid "Simple sale popup with light background and black text, and a call-to-action link." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:476 +msgid "Dark Mode Banner" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:477 +msgctxt "Block pattern description" +msgid "Inverted banner with a calendar emoji, dark background, light text, and a red CTA button." +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:487 +msgid "Dark Mode Popup" +msgstr "" + +#: modules/banner/blocks/class-swsales-banner-module-blocks.php:488 +msgctxt "Block pattern description" +msgid "Inverted popup with a calendar emoji, dark background, light text, and a red CTA button." +msgstr "" + +#: modules/banner/pum/class-swsales-banner-module-pum.php:120 +msgid "Popup" +msgstr "" + +#: modules/banner/pum/class-swsales-banner-module-pum.php:130 +msgid "Select a Popup Maker popup to use for this sale." +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:249 +msgid "Custom Banner" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:288 +msgid "Save and Preview" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:289 +msgid "Optionally display a banner, which you can customize using additional settings below, to advertise your sale." +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:293 +msgid "Banner Template" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:306 +msgid "Banner Title" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:309 +msgid "A brief title for your sale, such as the holiday or purpose of the sale. (i.e. \"Limited Time Offer\")" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:313 +msgid "Banner Text" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:316 +msgid "A brief message about your sale. (i.e. \"Save 50% on membership through December.\")" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:320 +msgid "Button Text" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:323 +msgid "The text displayed on the button of your banner that links to the Landing Page. If you do not set a landing page, no button will be shown." +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:330 +msgid "+ Add custom banner CSS" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:335 +msgid "Custom Banner CSS" +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:338 +msgid "Optional. Use this area to add custom styles to modify the banner appearance." +msgstr "" + +#: modules/banner/swsales/class-swsales-banner-module-swsales.php:340 +msgid "Use these selectors to alter the appearance of your banners." +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:62 +#: modules/ecommerce/wc/class-swsales-module-wc.php:101 +msgid "Coupon" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:65 +msgid "If you would like a coupon associated with your sale, you can set it up in whatever eCommerce platform you are using and enter the code here." +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:72 +msgid "Confirmation Page URL" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:75 +msgid "If you would like to track checkout conversions, enter the full URL that your users are sent to after completing checkout." +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:82 +msgid "Average Order Value" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:85 +msgid "If you would like to estimate the revenue generated by your sale, enter the average sale price of each order." +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:178 +msgid "N/A" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:191 +msgid "US Dollars ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:193 +msgid "Euros (€)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:198 +msgid "Pounds Sterling (£)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:202 +msgid "Argentine Peso ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:203 +msgid "Australian Dollars ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:205 +msgid "Brazilian Real (R$)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:209 +msgid "Canadian Dollars ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:210 +msgid "Chinese Yuan" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:212 +msgid "Czech Koruna" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:220 +msgid "Danish Krone" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:228 +msgid "Ghanaian Cedi (₵)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:232 +msgid "Hong Kong Dollar ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:233 +msgid "Hungarian Forint" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:234 +msgid "Indian Rupee" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:235 +msgid "Indonesia Rupiah" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:236 +msgid "Israeli Shekel" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:238 +msgid "Japanese Yen (¥)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:243 +msgid "Kenyan Shilling" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:244 +msgid "Malaysian Ringgits" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:245 +msgid "Mexican Peso ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:246 +msgid "Nigerian Naira (₦)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:247 +msgid "New Zealand Dollar ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:248 +msgid "Norwegian Krone" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:249 +msgid "Philippine Pesos" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:250 +msgid "Polish Zloty" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:252 +msgid "Romanian Leu" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:260 +msgid "Russian Ruble (₽)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:268 +msgid "Singapore Dollar ($)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:273 +msgid "South African Rand (R)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:278 +msgid "South Korean Won" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:281 +msgid "Swedish Krona" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:282 +msgid "Swiss Franc" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:283 +msgid "Taiwan New Dollars" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:284 +msgid "Thai Baht" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:285 +msgid "Turkish Lira" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:287 +msgid "Ukrainian Hryvnia (₴)" +msgstr "" + +#: modules/ecommerce/custom/class-swsales-module-custom.php:295 +msgid "Vietnamese Dong" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:106 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:111 +msgid "Discount Code" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:128 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:130 +msgid "This discount code expires before the Sitewide Sale's end date." +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:130 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:132 +msgid "This discount code starts after the Sitewide Sale's start date." +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:144 +msgid "edit discount code" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:149 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:150 +msgid "create a new discount code" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:150 +msgid "Select the discount code that will be automatically applied for users when they visit your Landing Page." +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:356 +msgid "Original price" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:356 +msgid "sale price" +msgstr "" + +#: modules/ecommerce/edd/class-swsales-module-edd.php:397 +#: modules/ecommerce/wc/class-swsales-module-wc.php:473 +msgid "Purchases using %s" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:145 +msgid "edit code" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:151 +msgid "Select the code that will be automatically applied for users that complete an applicable membership checkout after visiting your Landing Page." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:178 +msgid "Hide Sale by Level" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:200 +msgid "This setting will completely hide the sale from users with the selected levels (including the banner and discount logic)." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:228 +msgid "Checkout Level" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:243 +msgid "Using the [pmpro_checkout] shortcode on your Landing Page will display a checkout form for this level." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:276 +msgid "Successfully migrated %d Sitewide Sale from the Sitewide Sales Add On for Paid Memberships Pro." +msgid_plural "Successfully migrated %d Sitewide Sales from the Sitewide Sales Add On for Paid Memberships Pro." +msgstr[0] "" +msgstr[1] "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:302 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:331 +msgid "Migrate Your Previous Sales Data" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:303 +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:332 +msgid "We have detected data from the Sitewide Sales Add On for Paid Memberships Pro. You can migrate this data into the new Sitewide Sales plugin and maintain access to previous sales, settings, and reports. The database migration process will attempt to run in a single process, so please be patient." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:307 +msgid "Migrate PMPro Sitewide Sales Data" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:310 +msgid "Dismiss This Notice" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:336 +msgid "Migrate PMPro Sitewide Sales Data »" +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:589 +msgid "Error inserting discount code. Try doing it manually." +msgstr "" + +#: modules/ecommerce/pmpro/class-swsales-module-pmpro.php:788 +msgid "Checkouts using %s" +msgstr "" + +#: modules/ecommerce/wc/class-swsales-module-wc.php:121 +msgid "This coupon expires on or before the Sitewide Sale's end date." +msgstr "" + +#: modules/ecommerce/wc/class-swsales-module-wc.php:134 +msgid "edit coupon" +msgstr "" + +#: modules/ecommerce/wc/class-swsales-module-wc.php:139 +msgid "create a new coupon" +msgstr "" + +#: modules/ecommerce/wc/class-swsales-module-wc.php:140 +msgid "Select the coupon that will be automatically applied for users when they visit your Landing Page." +msgstr "" + +#: blocks/countdown-timer/block.js:30 +msgid "Countdown Timer" +msgstr "" + +#: blocks/countdown-timer/block.js:31 +msgid "Add a countdown timer on your Sitewide Sale landing page that counts down to your sale start date or end date." +msgstr "" + +#: blocks/countdown-timer/block.js:39 +msgid "sale countdown" +msgstr "" + +#: blocks/countdown-timer/block.js:40 +msgid "sale timer" +msgstr "" + +#: blocks/countdown-timer/block.js:75 +msgid "Timer Ends On" +msgstr "" + +#: blocks/countdown-timer/block.js:78 +msgid "Select whether this timer counts down to the sale start date or end date." +msgstr "" + +#: blocks/sale-content/block.js:30 +msgid "Build your Sitewide Sale landing page with blocks. Place blocks within this section to conditionally show the content before, during, or after the sale." +msgstr "" + +#: blocks/sale-content/block.js:38 +msgid "sale visibility" +msgstr "" + +#: blocks/sale-content/block.js:39 +msgid "before sale" +msgstr "" + +#: blocks/sale-content/block.js:40 +msgid "after sale" +msgstr "" + +#: blocks/sale-content/block.js:41 +msgid "sale content" +msgstr "" + +#: blocks/sale-content/block.js:73 +#: blocks/sale-content/block.js:79 +msgid "Sitewide Sale Content" +msgstr "" + +#: blocks/sale-period-setting/block.js:61 +msgid "Sale Period Visibility" +msgstr "" diff --git a/modules/banner/blocks/swsales-banner-module-blocks-settings.js b/modules/banner/blocks/swsales-banner-module-blocks-settings.js index 1bf0023..2aac918 100644 --- a/modules/banner/blocks/swsales-banner-module-blocks-settings.js +++ b/modules/banner/blocks/swsales-banner-module-blocks-settings.js @@ -3,6 +3,7 @@ jQuery( document ).ready( // create new reusable block banner AJAX $( '#swsales_create_reusable_block_banner' ).click( function() { + $( '#swsales_create_reusable_block_banner' ).attr( 'disabled','disabled' ); var data = { 'action': 'swsales_create_reusable_block_banner', 'swsales_id': $( '#post_ID' ).val(), diff --git a/modules/ecommerce/edd/class-swsales-module-edd.php b/modules/ecommerce/edd/class-swsales-module-edd.php index 817d649..39687a6 100644 --- a/modules/ecommerce/edd/class-swsales-module-edd.php +++ b/modules/ecommerce/edd/class-swsales-module-edd.php @@ -52,16 +52,15 @@ public static function init() { if( version_compare( floatval( EDD_VERSION ), 3, '>=' ) ){ //EDD V3's Stats add_filter( 'swsales_get_checkout_conversions', array( __CLASS__, 'checkout_conversions' ), 10, 2 ); - add_filter( 'swsales_get_revenue', array( __CLASS__, 'sale_revenue' ), 10, 2 ); + add_filter( 'swsales_get_revenue', array( __CLASS__, 'sale_revenue' ), 10, 3 ); add_filter( 'swsales_daily_revenue_chart_data', array( __CLASS__, 'daily_revenue_chart_data' ), 10, 2 ); - - add_action( 'swsales_additional_reports', array( __CLASS__, 'additional_report' ) ); + add_filter( 'swsales_get_other_revenue', array( __CLASS__, 'get_other_revenue' ), 10, 3 ); + add_filter( 'swsales_get_total_revenue', array( __CLASS__, 'total_revenue' ), 10, 3 ); } else { //EDD Legacy Stats add_filter( 'swsales_get_checkout_conversions', array( __CLASS__, 'legacy_checkout_conversions' ), 10, 2 ); - add_filter( 'swsales_get_revenue', array( __CLASS__, 'legacy_sale_revenue' ), 10, 2 ); + add_filter( 'swsales_get_revenue', array( __CLASS__, 'legacy_sale_revenue' ), 10, 3 ); add_filter( 'swsales_daily_revenue_chart_data', array( __CLASS__, 'legacy_daily_revenue_chart_data' ), 10, 2 ); - add_action( 'swsales_additional_reports', array( __CLASS__, 'legacy_additional_report' ) ); } } @@ -96,8 +95,12 @@ public static function add_choose_coupon( $cur_sale ) { } else { //Compatible with EDD 2.9 and 3.0 - $coupons = edd_get_discounts( array( 'active' ) ); - + $coupons = edd_get_discounts( + array( + 'fields' => array( 'id', 'code'), + 'status' => 'active', + ) + ); $current_coupon = intval( $cur_sale->get_meta_value( 'swsales_edd_coupon_id', null ) ); ?>
-
-

-
-
- -

-
-

+

+
+

+
+
+ +

+