Changeset 2998124
- Timestamp:
- 11/18/2023 03:24:36 PM (16 months ago)
- Location:
- wp-sendfox/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-sendfox/trunk/lang/sf4wp.pot
r2832500 r2998124 3 3 msgstr "" 4 4 "Project-Id-Version: SendFox for Wordpress\n" 5 "POT-Creation-Date: 202 2-09-15 21:55+0600\n"5 "POT-Creation-Date: 2023-11-17 17:49+0600\n" 6 6 "PO-Revision-Date: 2020-03-03 17:39+0600\n" 7 7 "Last-Translator: \n" … … 152 152 msgstr "" 153 153 154 #: wp-sendfox-admin.php:100 wp-sendfox-admin.php:2 88154 #: wp-sendfox-admin.php:100 wp-sendfox-admin.php:295 155 155 msgid "Integrations" 156 156 msgstr "" … … 176 176 msgstr "" 177 177 178 #: wp-sendfox-admin.php:157 wp-sendfox.php:38 1178 #: wp-sendfox-admin.php:157 wp-sendfox.php:389 179 179 msgid "Error: Response Status" 180 180 msgstr "" … … 273 273 msgstr "" 274 274 275 #: wp-sendfox-admin.php:289 275 #: wp-sendfox-admin.php:283 276 msgid "LearnDash Course Enrollment" 277 msgstr "" 278 279 #: wp-sendfox-admin.php:284 280 msgid "Subscribes people, when they enroll into your LearnDash courses" 281 msgstr "" 282 283 #: wp-sendfox-admin.php:296 276 284 msgid "back to all integrations" 277 285 msgstr "" 278 286 279 #: wp-sendfox-admin.php: 298287 #: wp-sendfox-admin.php:305 280 288 msgid "" 281 289 "The table below shows all available integrations. Click on the name of an " … … 283 291 msgstr "" 284 292 285 #: wp-sendfox-admin.php:3 06293 #: wp-sendfox-admin.php:313 286 294 msgid "integration settings" 287 295 msgstr "" 288 296 289 #: wp-sendfox-admin.php:3 23297 #: wp-sendfox-admin.php:330 290 298 msgid "Name" 291 299 msgstr "" 292 300 293 #: wp-sendfox-admin.php:3 24301 #: wp-sendfox-admin.php:331 294 302 msgid "Description" 295 303 msgstr "" 296 304 297 #: wp-sendfox-admin.php:3 25305 #: wp-sendfox-admin.php:332 298 306 msgid "Status" 299 307 msgstr "" 300 308 301 #: wp-sendfox-admin.php:3 34309 #: wp-sendfox-admin.php:341 302 310 msgid "Configure this integration" 303 311 msgstr "" 304 312 305 #: wp-sendfox-admin.php:374 wp-sendfox-admin.php:598 wp-sendfox-admin.php:635 313 #: wp-sendfox-admin.php:381 wp-sendfox-admin.php:603 wp-sendfox-admin.php:690 314 #: wp-sendfox-admin.php:727 306 315 msgid "Enable?" 307 316 msgstr "" 308 317 309 #: wp-sendfox-admin.php:3 84 wp-sendfox-admin.php:402 wp-sendfox-admin.php:422310 #: wp-sendfox-admin.php:5 04 wp-sendfox-admin.php:524 wp-sendfox-admin.php:608311 #: wp-sendfox-admin.php: 645318 #: wp-sendfox-admin.php:391 wp-sendfox-admin.php:409 wp-sendfox-admin.php:429 319 #: wp-sendfox-admin.php:511 wp-sendfox-admin.php:531 wp-sendfox-admin.php:613 320 #: wp-sendfox-admin.php:700 wp-sendfox-admin.php:737 312 321 msgid "yes" 313 322 msgstr "" 314 323 315 #: wp-sendfox-admin.php:3 86324 #: wp-sendfox-admin.php:393 316 325 #, php-format 317 326 msgid "" … … 319 328 msgstr "" 320 329 321 #: wp-sendfox-admin.php:39 2330 #: wp-sendfox-admin.php:399 322 331 msgid "Implicit?" 323 332 msgstr "" 324 333 325 #: wp-sendfox-admin.php:4 04334 #: wp-sendfox-admin.php:411 326 335 msgid "" 327 336 "Select \"yes\" if you want to subscribe people without asking them " … … 329 338 msgstr "" 330 339 331 #: wp-sendfox-admin.php:4 06340 #: wp-sendfox-admin.php:413 332 341 msgid "Does not bypass the double opt-in on Free & Lifetime plans." 333 342 msgstr "" 334 343 335 #: wp-sendfox-admin.php:41 2344 #: wp-sendfox-admin.php:419 336 345 msgid "Pre-checked?" 337 346 msgstr "" 338 347 339 #: wp-sendfox-admin.php:4 24348 #: wp-sendfox-admin.php:431 340 349 msgid "Select \"yes\" if the checkbox should be pre-checked." 341 350 msgstr "" 342 351 343 #: wp-sendfox-admin.php:43 0352 #: wp-sendfox-admin.php:437 wp-sendfox-admin.php:621 344 353 msgid "SendFox list" 345 354 msgstr "" 346 355 347 #: wp-sendfox-admin.php:44 2 wp-sendfox-admin.php:698356 #: wp-sendfox-admin.php:449 wp-sendfox-admin.php:633 wp-sendfox-admin.php:790 348 357 msgid "are you connected to SendFox?" 349 358 msgstr "" 350 359 351 #: wp-sendfox-admin.php:4 53360 #: wp-sendfox-admin.php:460 wp-sendfox-admin.php:644 352 361 msgid "select the list..." 353 362 msgstr "" 354 363 355 #: wp-sendfox-admin.php:4 76364 #: wp-sendfox-admin.php:483 356 365 msgid "Checkbox label text" 357 366 msgstr "" 358 367 359 #: wp-sendfox-admin.php:4 88368 #: wp-sendfox-admin.php:495 360 369 msgid "" 361 370 "HTML tags like <code><strong><em><a></code> are allowed in " … … 363 372 msgstr "" 364 373 365 #: wp-sendfox-admin.php: 494374 #: wp-sendfox-admin.php:501 366 375 msgid "Load default CSS?" 367 376 msgstr "" 368 377 369 #: wp-sendfox-admin.php:5 06378 #: wp-sendfox-admin.php:513 370 379 msgid "Select \"yes\" if the checkbox looks sloppy." 371 380 msgstr "" 372 381 373 #: wp-sendfox-admin.php:5 14382 #: wp-sendfox-admin.php:521 374 383 msgid "Manual comment approval check?" 375 384 msgstr "" 376 385 377 #: wp-sendfox-admin.php:5 26386 #: wp-sendfox-admin.php:533 378 387 msgid "" 379 388 "Submit email to SendFox after comment was approved manually. Otherwise, " … … 381 390 msgstr "" 382 391 383 #: wp-sendfox-admin.php:5 36392 #: wp-sendfox-admin.php:543 384 393 msgid "Position on checkout" 385 394 msgstr "" 386 395 387 #: wp-sendfox-admin.php:54 1396 #: wp-sendfox-admin.php:548 388 397 msgid "select the position..." 389 398 msgstr "" 390 399 391 #: wp-sendfox-admin.php:55 0400 #: wp-sendfox-admin.php:557 392 401 msgid "After billing details" 393 402 msgstr "" 394 403 395 #: wp-sendfox-admin.php:55 1404 #: wp-sendfox-admin.php:558 396 405 msgid "After shipping details" 397 406 msgstr "" 398 407 399 #: wp-sendfox-admin.php:55 2408 #: wp-sendfox-admin.php:559 400 409 msgid "After customer details" 401 410 msgstr "" 402 411 403 #: wp-sendfox-admin.php:5 53412 #: wp-sendfox-admin.php:560 404 413 msgid "Before submit button" 405 414 msgstr "" 406 415 407 #: wp-sendfox-admin.php:5 54416 #: wp-sendfox-admin.php:561 408 417 msgid "After order notes" 409 418 msgstr "" 410 419 411 #: wp-sendfox-admin.php:593 420 #: wp-sendfox-admin.php:615 421 #, php-format 422 msgid "" 423 "Enable the %s integration? All new enrollees to any course will be " 424 "subscribed to your list." 425 msgstr "" 426 427 #: wp-sendfox-admin.php:685 412 428 msgid "" 413 429 "Important: Please, make sure only one Divi Theme or Divi Builder is " … … 415 431 msgstr "" 416 432 417 #: wp-sendfox-admin.php: 610433 #: wp-sendfox-admin.php:702 418 434 #, php-format 419 435 msgid "" … … 422 438 msgstr "" 423 439 424 #: wp-sendfox-admin.php: 646440 #: wp-sendfox-admin.php:738 425 441 #, php-format 426 442 msgid "" … … 429 445 msgstr "" 430 446 431 #: wp-sendfox-admin.php: 670447 #: wp-sendfox-admin.php:762 432 448 msgid "Export your contacts" 433 449 msgstr "" 434 450 435 #: wp-sendfox-admin.php: 674451 #: wp-sendfox-admin.php:766 436 452 msgid "" 437 453 "Here you can export either all your Wordpress user emails or all your " … … 439 455 msgstr "" 440 456 441 #: wp-sendfox-admin.php: 676457 #: wp-sendfox-admin.php:768 442 458 msgid "If email already exists in your list(s), it will be ignored." 443 459 msgstr "" 444 460 445 #: wp-sendfox-admin.php: 680461 #: wp-sendfox-admin.php:772 446 462 msgid "" 447 463 "To start pick the destination and source below and click \"Start export\":" 448 464 msgstr "" 449 465 450 #: wp-sendfox-admin.php: 685466 #: wp-sendfox-admin.php:777 451 467 msgid "Pick the List (export destination):" 452 468 msgstr "" 453 469 454 #: wp-sendfox-admin.php: 718470 #: wp-sendfox-admin.php:810 455 471 msgid "Pick Export mode (export source):" 456 472 msgstr "" 457 473 458 #: wp-sendfox-admin.php: 722474 #: wp-sendfox-admin.php:814 459 475 msgid "Export Wordpress user emails" 460 476 msgstr "" 461 477 462 #: wp-sendfox-admin.php: 723478 #: wp-sendfox-admin.php:815 463 479 msgid "Export WooCommerce customer emails" 464 480 msgstr "" 465 481 466 #: wp-sendfox-admin.php: 728482 #: wp-sendfox-admin.php:820 467 483 msgid "Do not close or reload the page during export." 468 484 msgstr "" 469 485 470 #: wp-sendfox-admin.php: 740486 #: wp-sendfox-admin.php:832 471 487 msgid "Start export" 472 488 msgstr "" 473 489 474 #: wp-sendfox-admin.php: 744490 #: wp-sendfox-admin.php:836 475 491 msgid "Contacts exported successfully:" 476 492 msgstr "" 477 493 478 #: wp-sendfox-admin.php: 745494 #: wp-sendfox-admin.php:837 479 495 msgid "Contacts not exported:" 480 496 msgstr "" 481 497 482 #: wp-sendfox-admin.php: 989498 #: wp-sendfox-admin.php:1081 483 499 msgid "Logged data" 484 500 msgstr "" 485 501 486 #: wp-sendfox-admin.php: 993502 #: wp-sendfox-admin.php:1085 487 503 msgid "" 488 504 "Here you can find the detailed description of all the SendFox API requests " … … 490 506 msgstr "" 491 507 492 #: wp-sendfox-admin.php:10 04508 #: wp-sendfox-admin.php:1096 493 509 msgid "Log was cleared successfully." 494 510 msgstr "" 495 511 496 #: wp-sendfox-admin.php:1 012512 #: wp-sendfox-admin.php:1104 497 513 msgid "Oops, log is empty..." 498 514 msgstr "" 499 515 500 #: wp-sendfox-admin.php:1 026516 #: wp-sendfox-admin.php:1118 501 517 msgid "Clear log" 502 518 msgstr "" 503 519 504 #: wp-sendfox.php:1 26520 #: wp-sendfox.php:134 505 521 msgid "Oops, you can't access this page." 506 522 msgstr "" 507 523 508 #: wp-sendfox.php:2 83524 #: wp-sendfox.php:291 509 525 msgid "API Key is not set." 510 526 msgstr "" 511 527 512 #: wp-sendfox.php:34 1528 #: wp-sendfox.php:349 513 529 msgid "JSON Parse" 514 530 msgstr "" -
wp-sendfox/trunk/readme.txt
r2834234 r2998124 4 4 Tags: sendfox, integration, woocommerce, wordpress, wp, export, emails, users, api 5 5 Requires at least: 4.6 6 Tested up to: 6. 16 Tested up to: 6.4 7 7 Requires PHP: 5.2.4 8 Stable tag: 1. 2.08 Stable tag: 1.3.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 56 56 == Changelog == 57 57 58 = 1.3.0 = 59 * integration: LearnDash Course Enrollment (Big thanks to Rodolfo Martinez!); 60 * feature: added WooCommerce HPOS support; 61 58 62 = 1.2.0 = 59 63 * feature: (Gutenberg Opt-in Block) added form border styling options, button border styling options, form width (fixed or 100%), added separate sections for Form and Button options in Gutenberg Sidebar, added transparency selector for Form Background colorpicker; -
wp-sendfox/trunk/wp-sendfox-admin.php
r2772043 r2998124 277 277 'description' => __( 'Adds new customizable Email Optin block to Gutenberg. Pick a list and let everybody subscribe from any page.', 'sf4wp' ), 278 278 ), 279 280 // LearnDash integration 281 282 'learndash-course' => array( 283 'title' => __( 'LearnDash Course Enrollment', 'sf4wp' ), 284 'description' => __( 'Subscribes people, when they enroll into your LearnDash courses', 'sf4wp' ), 285 ), 279 286 ); 280 287 … … 583 590 <?php 584 591 elseif( 592 'learndash-course' === $integration 593 ): 594 595 if( empty( $options[ $integration ] ) ) 596 { 597 $options[ $integration ] = array(); 598 } 599 ?> 600 <table class="form-table"><tbody> 601 602 <tr> 603 <th><?php _e( 'Enable?', 'sf4wp' ); ?></th> 604 <td> 605 606 <input 607 type="checkbox" 608 name="gb_sf4wp_options[<?php echo $integration; ?>][enabled]" 609 value="1" 610 <?php 611 echo ( !empty( $options[ $integration ]['enabled'] ) ? 612 checked( $options[ $integration ]['enabled'], '1', FALSE ) : '' ); 613 ?> /> <?php _e( 'yes', 'sf4wp' ); ?> 614 615 <p class="hint"><?php echo sprintf( __( 'Enable the %s integration? All new enrollees to any course will be subscribed to your list.', 'sf4wp' ), $all_integrations[ $integration ]['title'] ); ?></p> 616 617 </td> 618 </tr> 619 620 <tr> 621 <th><?php _e( 'SendFox list', 'sf4wp' ); ?></th> 622 <td> 623 <?php 624 625 $lists = gb_sf4wp_get_lists(); 626 627 if( 628 $lists['status'] === 'error' || 629 empty( $lists['result'] ) || 630 empty( $lists['result']['data'] ) 631 ) 632 { 633 echo 'No lists found, <a href="' . admin_url( 'admin.php?page=' . GB_SF4WP_ID . '&tab=connect' ) . '">' . __( 'are you connected to SendFox?', 'sf4wp' ) . '</a>'; 634 } 635 else 636 { 637 echo '<select name="gb_sf4wp_options[' . $integration . '][list]" class="widefat">'; 638 639 if( empty( $options[ $integration ]['list'] ) ) 640 { 641 $options[ $integration ]['list'] = ''; 642 } 643 644 echo '<option value="">' . __( 'select the list...', 'sf4wp' ) . '</option>'; 645 646 foreach( $lists['result']['data'] as $l ) 647 { 648 if( $options[ $integration ]['list'] == $l['id'] ) 649 { 650 echo '<option value="' . $l['id'] . '" selected="selected">' . $l['name'] . '</option>'; 651 } 652 else 653 { 654 echo '<option value="' . $l['id'] . '">' . $l['name'] . '</option>'; 655 } 656 } 657 658 echo '</select>'; 659 } 660 661 ?> 662 663 </td> 664 </tr> 665 666 </tbody></table> 667 668 <?php // to help pre_update_option function process single checkbox properly ?> 669 <input type="hidden" name="gb_sf4wp_options[<?php echo $integration; ?>][dummy]" value="1" /> 670 671 <div> 672 <?php submit_button(); ?> 673 </div> 674 675 <?php 676 elseif( 585 677 'divi' === $integration 586 678 ): -
wp-sendfox/trunk/wp-sendfox.php
r2834235 r2998124 6 6 Author: BogdanFix 7 7 Author URI: https://bogdanfix.com/ 8 Version: 1. 2.08 Version: 1.3.0 9 9 Text Domain: sf4wp 10 10 Domain Path: /lang … … 16 16 17 17 define( 'GB_SF4WP_NAME', 'SendFox for WordPress' ); 18 define( 'GB_SF4WP_VER', '1. 2.0' );18 define( 'GB_SF4WP_VER', '1.3.0' ); 19 19 define( 'GB_SF4WP_ID', 'wp-sendfox' ); 20 20 … … 79 79 } 80 80 } 81 82 // declare WooCommerce HPOS support 83 84 add_action( 'before_woocommerce_init', function() { 85 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { 86 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); 87 } 88 } ); 81 89 } 82 90 add_action( 'init', 'gb_sf4wp_init' ); … … 848 856 849 857 /** 858 * LearnDash Course Enrollment: handle enrollment 859 * 860 * @since 1.3.0 861 */ 862 863 function gb_sf4wp_learndash_course_enroll( $user_id, $course_id, $course_access_list, $remove ) 864 { 865 if( ! $remove ) 866 { 867 $user = get_user_by( 'id', $user_id ); 868 869 if( !empty( $user ) && !empty( $user->user_email ) ) 870 { 871 $options = get_option( 'gb_sf4wp_options' ); 872 873 if( 874 !empty( $options['learndash-course'] ) && 875 !empty( $options['learndash-course']['enabled'] ) && 876 !empty( $options['learndash-course']['list'] ) 877 ) 878 { 879 $contact = array( 880 'email' => $user->user_email, 881 'lists' => array( 882 intval( $options['learndash-course']['list'] ) 883 ), 884 ); 885 886 if( !empty( $user->user_nicename ) ) 887 { 888 $contact['first_name'] = $user->user_nicename; 889 } 890 891 $contact = apply_filters( 'sf4wp_before_add_contact', $contact, 'learndash-course', $user ); 892 893 $result = gb_sf4wp_add_contact( $contact ); 894 } 895 } 896 } 897 } 898 add_action( 'learndash_update_course_access', 'gb_sf4wp_learndash_course_enroll', 10, 4 ); 899 900 /** 850 901 * Process synchronization 851 902 * … … 891 942 global $wpdb; 892 943 893 $users = $wpdb->get_var( 894 895 "SELECT COUNT(DISTINCT meta_value) 896 FROM {$wpdb->postmeta} 897 WHERE meta_key = '_billing_email' AND meta_value <> '' ;" 898 899 ); 944 if( Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled() ) 945 { 946 $orders = wc_get_orders( 947 array( 948 'field_query' => array( 949 array( 950 'field' => 'billing_email', 951 'value' => '', 952 'comparison' => '!=' 953 ), 954 ), 955 'limit' => -1, 956 'return' => 'ids', 957 ) 958 ); 959 960 $users = count( $orders ); 961 } 962 else 963 { 964 $users = $wpdb->get_var( 965 966 "SELECT COUNT(DISTINCT meta_value) 967 FROM {$wpdb->postmeta} 968 WHERE meta_key = '_billing_email' AND meta_value <> '' ;" 969 970 ); 971 } 900 972 901 973 if( !empty( $users ) ) … … 1005 1077 $limit = intval( GB_SF4WP_USERS_PER_STEP ); 1006 1078 1007 $customers = $wpdb->get_results( 1008 1009 "SELECT DISTINCT meta_value as billing_email 1010 FROM {$wpdb->postmeta} 1011 WHERE meta_key = '_billing_email' AND meta_value <> '' 1012 LIMIT {$offset}, {$limit};" 1013 ); 1079 if( Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled() ) 1080 { 1081 $orders = wc_get_orders( 1082 array( 1083 'field_query' => array( 1084 array( 1085 'field' => 'billing_email', 1086 'value' => '', 1087 'comparison' => '!=' 1088 ), 1089 ), 1090 'limit' => $limit, 1091 'offset' => $offset 1092 ) 1093 ); 1094 1095 $customers = array(); 1096 1097 if( !empty( $orders ) ) 1098 { 1099 $c = new stdClass(); 1100 1101 foreach( $orders as $o ) 1102 { 1103 $c = new stdClass(); 1104 $c->billing_email = $o->get_billing_email(); 1105 1106 $customers[] = $c; 1107 } 1108 } 1109 } 1110 else 1111 { 1112 $customers = $wpdb->get_results( 1113 1114 "SELECT DISTINCT meta_value as billing_email 1115 FROM {$wpdb->postmeta} 1116 WHERE meta_key = '_billing_email' AND meta_value <> '' 1117 LIMIT {$offset}, {$limit};" 1118 ); 1119 } 1014 1120 1015 1121 if( !empty( $customers ) )
Note: See TracChangeset
for help on using the changeset viewer.