Plugin Directory

Changeset 3162012


Ignore:
Timestamp:
10/03/2024 10:17:11 AM (17 months ago)
Author:
PurpleTurtlePro
Message:

fixed the error notification

Location:
exportfeed-for-woocommerce-product-to-etsy/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • exportfeed-for-woocommerce-product-to-etsy/trunk/core/ajax/wp/dashboard-data.php

    r3146237 r3162012  
    5151    global $wpdb;
    5252    $orders_table = $wpdb->prefix . 'etcpf_orders';
    53     $sync_message = 'Order synced sucessfully';
    54     // Prepare the SQL query.
     53    $sync_messages = ['Order synced sucessfully', 'Order Synced successfully'];
     54
     55    // Prepare the SQL query to exclude both message variations.
     56    $placeholders = implode(', ', array_fill(0, count($sync_messages), '%s'));
     57
    5558    $sql = $wpdb->prepare(
    56         "SELECT COUNT(*) FROM {$orders_table} WHERE woo_error_message != %s",
    57         $sync_message
     59        "SELECT COUNT(*) FROM {$orders_table} WHERE woo_error_message NOT IN ($placeholders)",
     60        ...$sync_messages
    5861    );
     62
    5963    $unsynced_order_count = $wpdb->get_var( $sql );
    6064    return absint( $unsynced_order_count );
  • exportfeed-for-woocommerce-product-to-etsy/trunk/exportfeed-for-etsy-product-feed.php

    r3156806 r3162012  
    66 * Description: Etsy Marketplace Integration for WooCommerce: sync products, orders, and inventory in real-time
    77 * Author: Digital Product Labs Inc.
    8  * Version: 6.3.4
     8 * Version: 6.3.5
    99 * Author URI: https://dpl.company/woocommerce-etsy-integration/
    1010 * License:  GPL2
     
    721721    }
    722722
    723     add_action( 'admin_notices', 'etcpf_display_order_error_message' );
    724     function etcpf_display_order_error_message() {
    725         global $wpdb;
    726         $table_name = $wpdb->prefix . 'etcpf_orders';
    727         if ( get_option( 'etcpf_current_db_version' ) >= '4.0' ) {
    728             $table_exists = $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name ) );
    729             if ( $table_exists ) {
    730                 $error_check = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->prefix}etcpf_orders WHERE woo_error_message = %s", 'Product is out of stock.' ) );
    731             }
    732             if ( $error_check > 0 ) {
    733                 echo '<div class="notice notice-error is-dismissible"><p>Etsy Feed: One (or more) of the Etsy order has not been synced to WooCommerce.<a href="admin.php?page=etsy-export-feed-order">Click here</a> to see and fix them.</p></div>';
    734             }
    735         }
    736     }
    737 
    738723    add_action(
    739724        'etcpf_product_update_event',
  • exportfeed-for-woocommerce-product-to-etsy/trunk/readme.txt

    r3156806 r3162012  
    44Requires at least: 5.8.0
    55Tested up to: 6.6.1
    6 Stable tag: 6.3.4
     6Stable tag: 6.3.5
    77Requires PHP: 5.4
    88License: GPLv2 or later
     
    111111
    112112== Changelog ==
     113= 6.3.5 2024/10/03 =
     114* Fix: Order failed message on successful order
     115
    113116= 6.3.4 2024/09/24 =
    114117* Fix: Fatal Error while uploading the product.
Note: See TracChangeset for help on using the changeset viewer.