@@ -132,7 +132,7 @@ function ppom_meta_list( $post ) {
132132 $ html .= '<th> ' . __ ( 'Group Name ' , 'woocommerce-product-addon ' ) . '</th> ' ;
133133 $ html .= '<th> ' . __ ( 'Edit ' , 'woocommerce-product-addon ' ) . '</th> ' ;
134134 $ html .= '</tr></thead> ' ;
135-
135+
136136 foreach ( $ all_meta as $ meta ) {
137137 $ html .= '<tr data-ppom-search=" ' . esc_attr ( sanitize_key ( $ meta ->productmeta_name ) ) . '" style="cursor: move;"> ' ;
138138
@@ -250,15 +250,15 @@ function ppom_admin_process_product_meta( $post_id ) {
250250
251251
252252 $ ppom_meta_selected = isset ( $ _POST ['ppom_product_meta ' ] ) ? $ _POST ['ppom_product_meta ' ] : array ();
253-
253+
254254 if ( is_numeric ( $ ppom_meta_selected ) ) {
255255 $ ppom_meta_selected = array ( $ ppom_meta_selected );
256256 } elseif ( ! is_array ( $ ppom_meta_selected ) ) {
257257 $ ppom_meta_selected = array ();
258258 }
259-
259+
260260 $ ppom_meta_selected = array_map ( 'intval ' , $ ppom_meta_selected );
261-
261+
262262 // ppom_pa($ppom_meta_selected); exit;
263263 update_post_meta ( $ post_id , PPOM_PRODUCT_META_KEY , $ ppom_meta_selected );
264264
@@ -428,7 +428,7 @@ function ( $pm ) {
428428 return ! empty ( $ pm ['type ' ] ) && ! empty ( $ pm ['data_name ' ] );
429429 }
430430 );
431-
431+
432432 // Updating PPOM Meta with ppom_id in each meta array
433433 ppom_admin_update_ppom_meta_only ( $ ppom_id , $ product_meta );
434434
@@ -925,32 +925,31 @@ function ppom_add_black_friday_data( $configs ) {
925925 $ is_expired = 'expired ' === $ status || 'active-expired ' === $ status ;
926926
927927 if ( $ is_pro ) {
928+ // translators: %s is the discount percentage.
929+ $ config ['plugin_meta_message ' ] = sprintf ( __ ( 'Black Friday Sale - up to %s off ' , 'woocommerce-product-addon ' ), '30% ' );
928930 // translators: %1$s - discount, %2$s - discount.
929931 $ message = sprintf ( __ ( 'Upgrade your PPOM Pro plan: %1$s off this week. Already on the plan you need? Renew early and save up to %2$s. ' , 'woocommerce-product-addon ' ), '30% ' , '20% ' );
930932 $ cta_label = __ ( 'See your options ' , 'woocommerce-product-addon ' );
931933 } elseif ( $ is_expired ) {
934+ // translators: %s is the discount percentage.
935+ $ config ['plugin_meta_message ' ] = sprintf ( __ ( 'Black Friday Sale - %s off ' , 'woocommerce-product-addon ' ), '50% ' );
932936 $ message = __ ( 'Your PPOM Pro features are still here, just locked. Renew at a reduced rate this week. ' , 'woocommerce-product-addon ' );
933937 $ cta_label = __ ( 'Reactivate now ' , 'woocommerce-product-addon ' );
934938 } else {
939+ // translators: %s is the discount percentage.
940+ $ config ['plugin_meta_message ' ] = sprintf ( __ ( 'Black Friday Sale - %s off ' , 'woocommerce-product-addon ' ), '60% ' );
935941 // translators: %s - discount.
936942 $ config ['title ' ] = sprintf ( __ ( 'PPOM Pro: %s off this week ' , 'woocommerce-product-addon ' ), '60% ' );
937- // translators: %s is the discount percentage.
938- $ config ['upgrade_menu_text ' ] = sprintf ( __ ( 'BF Sale - %s off ' , 'woocommerce-product-addon ' ), '60% ' );
939943 }
940-
944+
941945 $ url_params = array (
942946 'utm_term ' => $ is_pro ? 'plan- ' . $ plan : 'free ' ,
943947 'lkey ' => ! empty ( $ license ) ? $ license : false ,
944948 'expired ' => $ is_expired ? '1 ' : false ,
945949 );
946950
947951 if ( ( $ is_pro || $ is_expired ) && ! empty ( $ pro_product_slug ) ) {
948- // translators: %s is the discount percentage.
949- $ config ['plugin_meta_message ' ] = sprintf ( __ ( 'Black Friday Sale - up to %s off ' , 'woocommerce-product-addon ' ), '30% ' );
950952 $ config ['plugin_meta_targets ' ] = array ( $ pro_product_slug );
951- } else {
952- // translators: %s is the discount percentage.
953- $ config ['plugin_meta_message ' ] = sprintf ( __ ( 'Black Friday Sale - %s off ' , 'woocommerce-product-addon ' ), '60% ' );
954953 }
955954
956955 $ config ['message ' ] = $ message ;
0 commit comments