Okay
  Public Ticket #2264036
Connect more than 5 WooCommerce products to my events
Closed

Comments

  •  4
    Remko started the conversation

    The latest version of Amelia allows for linking a specific WooCommerce [roduct to an event (and service).

    Since I use an invoice plugin, I want every event (type) to be linked to a different WooCommerce product, so the description on the invoice is correct.

    I have noticed the dropdown to show WooCommerce products is limited to 5 products. It only shows the 5 most recently added products. 

    Am I doing something wrong or is the list always limited to the 5 most recent products?

  • [deleted] replied

    Hello Remko Sieben, 

    Unfortunately, we encountered a bug with this new feature that we added. The products list is limited to 5, but we have fixed this and it will be implemented in the new update of Amelia which will be later this week. Sorry for any inconvenience this have caused. 

    If you want, you can fix it for now, you need to find the file ameliabooking/src/Infrastructure/WP/Integrations/WooCommerce/WooCommerceService.php

    and around line 218

    replace this : 

    foreach (get_posts(['post_type' => 'product']) as $product) {

    with this:

    foreach (get_posts(['post_type' => 'product', 'posts_per_page' => -1]) as $product) {

    Of course delete cache, deactivate/activate the plugin afterwards. 

    If you have any further questions or concerns feel free to ask,