• Resolved marijegrondman

    (@marijegrondman)


    Hello,
    I’m using member discounta for my Woocommerce products.
    At first it seemed to work great, but now i cannot add more products to my cart once there is one membership product in it.

    I started with te option of an individual membership price for each product.
    That’s the way I want to use it.
    At first it seemed to work great, but after using it for a while I noticed once there was 1 membership product in the cart I coldn’t add anaother.
    When I removed the membership level from a productI was able to add it to the cart.

    After tesating and searching a lot I decided to switch to a discount percentage for a membership. Not quite what I wanted, but okay.
    Turns out this function has the same issue. After adding 1 product to my cart I’m unable to add more.

    In the WordPress envirement the message shows “This product cannot be purchased”

    Please let me know how to resolve this issue.
    Kind regards,
    Marije

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Jarryd Long

    (@jarryd-long)

    Hi there, thank you for reaching out to Paid Memberships Pro.

    This issue appears to occur intermittently however I cannot replicate it on my side.

    A temporary solution would be to add the following line of code to your site:

    remove_filter( 'woocommerce_is_purchasable', 'pmprowoo_is_purchasable', 10, 2 );

    This should remove the check for purchasing only one membership product at a time.

    Thread Starter marijegrondman

    (@marijegrondman)

    Hi Jarryd,

    Thanks for your fast response.
    I added the code and at first it looked OK, but after adding 4 products to the cart the same problem apeared.
    I added the first 4 pretty quick, could it be that the issue appears after like half a minute or 60 seconds?

    By the way, i’m using Elementor Pro.

    Plugin Support Jarryd Long

    (@jarryd-long)

    Did you add 4 different products to your cart of 4 of the same?

    The idea of limiting the user from adding the same product more than once is the intended functionality as we wouldn’t want the member to be assigned the same membership level more than once.

    Thread Starter marijegrondman

    (@marijegrondman)

    Adding the same product multiple times is no problem.
    The amount of 4 doesn’t seem to be the issue.
    In the meantime I managed to add a few more products to my cart, 7 different ptoducts for now.

    I tried to find differences in the products but haven’t found them so far.

    Plugin Support Jarryd Long

    (@jarryd-long)

    Do you have any caching active on your site? Do all of those products have a level associated with them?

    Would you mind sending me a copy of your Site Health?

    Please follow the steps below to retrieve your Site Health Info in the WordPress admin and reply back to us when the details have been added:

    1. Navigate to Tools > Site Health in the WordPress admin.
    2. Click on the “Info” tab.
    3. Click the button to “Copy site info to clipboard”.

    The entire output of your Site Health is now copied to your clipboard.

    You can then paste it into a reply here.

    Thread Starter marijegrondman

    (@marijegrondman)

    At the moment no caching active. I'm still building, and a caching plugin makes it harder to directly see the effects of the changes.
    WordPress is at the moment located on a subdomain of my own website.
    In a vew weeks I will transport it to a diffferent domain.

    Here is the Site health report:

    ` wp-core version: 6.4.2
    site_language: nl_NL
    user_language: nl_NL
    timezone: +00:00
    permalink: /%year%/%monthnum%/%day%/%postname%/
    https_status: false
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: open
    environment_type: production
    user_count: 2
    dotorg_communication: true wp-paths-sizes wordpress_path: /mnt/web218/d2/62/512012562/htdocs/STRATO-apps/BorisBites
    wordpress_size: 60,54 MB (63476160 bytes)
    uploads_path: /mnt/web218/d2/62/512012562/htdocs/STRATO-apps/BorisBites/wp-content/uploads
    uploads_size: 32,57 MB (34152964 bytes)
    themes_path: /mnt/web218/d2/62/512012562/htdocs/STRATO-apps/BorisBites/wp-content/themes
    themes_size: 292,17 KB (299185 bytes)
    plugins_path: /mnt/web218/d2/62/512012562/htdocs/STRATO-apps/BorisBites/wp-content/plugins
    plugins_size: 99,50 MB (104331258 bytes)
    database_size: 24,70 MB (25903104 bytes)
    total_size: 217,59 MB (228162671 bytes) wp-active-theme name: Hello Elementor (hello-elementor)
    version: 2.9.0
    author: Elementor Team
    author_website: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
    parent_theme: none
    theme_features: core-block-patterns, widgets-block-editor, menus, post-thumbnails, automatic-feed-links, title-tag, html5, custom-logo, editor-style, align-wide, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider
    theme_path: /mnt/web218/d2/62/512012562/htdocs/STRATO-apps/BorisBites/wp-content/themes/hello-elementor
    auto_update: Uitgeschakeld wp-themes-inactive (2) Astra: version: 4.5.2, author: Brainstorm Force, Auto-updates uitgeschakeld
    Twenty Twenty-Four: version: 1.0, author: the WordPress team, Auto-updates uitgeschakeld wp-plugins-active (6) Elementor: version: 3.18.2, author: Elementor.com, Auto-updates uitgeschakeld
    Elementor Pro: version: 3.18.1, author: Elementor.com, Auto-updates uitgeschakeld
    Paid Memberships Pro: version: 2.12.6, author: Paid Memberships Pro, Auto-updates uitgeschakeld
    Paid Memberships Pro - WooCommerce Add On: version: 1.8, author: Paid Memberships Pro, Auto-updates uitgeschakeld
    UpdraftPlus - Backup/Restore: version: 1.23.13, author: UpdraftPlus.Com, DavidAnderson, Auto-updates uitgeschakeld
    WooCommerce: version: 8.4.0, author: Automattic, Auto-updates uitgeschakeld wp-plugins-inactive (6) Advanced Dynamic Pricing for WooCommerce: version: 4.5.4, author: AlgolPlus, Auto-updates uitgeschakeld
    Booster for WooCommerce: version: 7.1.4, author: Pluggabl LLC (latest version: 7.1.5), Auto-updates uitgeschakeld
    Dynamic Pricing and Discount Rules: version: 2.2.5, author: ThemeHigh, Auto-updates uitgeschakeld
    Min and Max Quantity for WooCommerce: version: 1.3.4, author: BeRocket, Auto-updates uitgeschakeld
    Related Products for WooCommerce: version: 1.5.1, author: WebToffee, Auto-updates uitgeschakeld
    Woo Discount Rules: version: 2.6.2, author: Flycart, Auto-updates uitgeschakeld wp-media image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1692
    imagemagick_version: ImageMagick 6.9.12-90 Q16 x86_64 17868 https://legacy.imagemagick.org
    imagick_version: 3.5.1
    file_uploads: 1
    post_max_size: 128M
    upload_max_filesize: 128M
    max_effective_size: 128 MB
    max_file_uploads: 20
    imagick_limits:
    imagick::RESOURCETYPE_AREA: 8 GB
    imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
    imagick::RESOURCETYPE_FILE: 192
    imagick::RESOURCETYPE_MAP: 4 GB
    imagick::RESOURCETYPE_MEMORY: 2 GB
    imagick::RESOURCETYPE_THREAD: 1
    imagick::RESOURCETYPE_TIME: 9.2233720368548E+18
    imagemagick_file_formats: 3FR, 3G2, 3GP, A, AAI, AI, APNG, ART, ARW, AVI, AVS, B, BGR, BGRA, BGRO, BMP, BMP2, BMP3, BRF, C, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FLV, FRACTAL, FTP, FTS, G, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K, K25, KDC, LABEL, M, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, O, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, R, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCREENSHOT, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMV, WPG, X3F, XBM, XC, XCF, XPM, XPS, XV, Y, YCbCr, YCbCrA, YUV
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, WebP, BMP
    ghostscript_version: not available wp-server server_architecture: Linux localhost 4.18.0-477.15.1.el8_8.x86_64 #1 SMP Linux localhost 4.18.0-477.15.1.el8_8.x86_64 #1 SMP Linux localhost 4.18.0-477.15.1.el8_8.x86_64 #1 SMP
    httpd_software: Apache/2.4.58 (Unix)
    php_version: 8.0.30 64bit
    php_sapi: cgi-fcgi
    max_input_variables: 4000
    time_limit: 240
    memory_limit: 512M
    max_input_time: 60
    upload_max_filesize: 128M
    php_post_max_size: 128M
    curl_version: 8.4.0 OpenSSL/3.0.10
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: false
    current: 2023-12-20T08:37:28+00:00
    utc-time: Wednesday, 20-Dec-23 08:37:28 UTC
    server-time: 2023-12-20T08:37:24+00:00 wp-database extension: mysqli
    server_version: 10.6.15-MariaDB-1:10.6.15+maria~deb11-log
    client_version: mysqlnd 8.0.30
    max_allowed_packet: 67108864
    max_connections: 3000 wp-constants WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /mnt/web218/d2/62/512012562/htdocs/STRATO-apps/BorisBites/wp-content
    WP_PLUGIN_DIR: /mnt/web218/d2/62/512012562/htdocs/STRATO-apps/BorisBites/wp-content/plugins
    WP_MEMORY_LIMIT: 40M
    WP_MAX_MEMORY_LIMIT: 512M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Ongedefinieerd
    WP_DEVELOPMENT_MODE: undefined
    DB_CHARSET: utf8mb4
    DB_COLLATE: undefined wp-filesystem wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable pmpro pmpro-cron-jobs: pmpro_cron_expire_memberships (2023-12-20 08:43:54) |
    pmpro_cron_expiration_warnings (2023-12-20 08:43:55) |
    pmpro_cron_stripe_subscription_updates (2023-12-20 09:43:54) |
    pmpro_cron_admin_activity_email (2023-12-20 10:30:00) |
    pmpro_cron_delete_tmp (2023-12-20 10:30:00) |
    pmpro_cron_credit_card_expiring_warnings (2024-01-18 09:43:54) |
    pmpro_license_check_key (2024-01-18 09:43:54)
    pmpro-gateway: Standaard []
    pmpro-gateway-env: Sandbox/Testen [sandbox]
    pmpro-orders: 0 bestellingen
    pmpro-discount-codes: 0 kortingscodes
    pmpro-sessions:
    session_status: Actief
    pmpro-membership-levels: {
    "3": {
    "id": "3",
    "name": "Retailer",
    "description": "",
    "confirmation": "",
    "initial_payment": 0,
    "billing_amount": 0,
    "cycle_number": "0",
    "cycle_period": "0",
    "billing_limit": "0",
    "trial_amount": 0,
    "trial_limit": "0",
    "allow_signups": "1",
    "expiration_number": "0",
    "expiration_period": "0"
    }
    }
    pmpro-custom-templates: Geen template overschrijvingen
    pmpro-getfile-usage: PMPRO_GETFILE_ENABLED is niet ingesteld
    pmpro-htaccess-cache-usage: Uit
    pmpro-pages:
    account: http://borisbites.mar-it.nl/mijn-account/
    billing: Not Set
    cancel: Not Set
    checkout: Not Set
    confirmation: Not Set
    invoice: Not Set
    levels: Not Set
    login: http://borisbites.mar-it.nl/bestellen-retailer/
    member_profile_edit: Not Set
    pmpro-library-conflicts: Geen bibliotheekconflicten gedetecteerd.
    pmpro-outdated-templates: Geen verouderde templates gedetecteerd.
    pmpro-current-site-url: http://borisbites.mar-it.nl
    pmpro-recorded-site-url: http://borisbites.mar-it.nl
    pmpro-pause-mode: Uitgeschakeld
    Plugin Author Jason Coleman

    (@strangerstudios)

    Marije, thanks for your patience here. Have you been able to figure things out.

    I think we need more detail about what you are trying to do with your site to give you the best feedback and advice. I don’t see the membership products on your site. (The dog treats look awesome.)

    The 1 membership per cart issue is a feature, not a bug. With core PMPro, users can only have one membership level at a time. And so we want to make sure they only check out for one membership at a time, otherwise the code doesn’t know what to do and basically gives/removes all the levels back to back.

    We do have a “Multiple Memberships per User” add on that removes this limitation. You can find that on our site or our GitHub repositories. The add on would replace that bit of code Jarryd shared to allow multiple products at WC checkout, and the add on also knows how to handle that so users can have multiple levels at once.

    But I suspect you may not be selling memberships. In which case PMPro might not be the solution for you. If you want to do a kind of recurring dog treat box, the WooCommerce extensions for subscriptions might be a better solution for you.

    Let me know if this helps.

    Plugin Support Jarryd Long

    (@jarryd-long)

    Because there have not been any recent updates to this topic, we will be changing the status to resolved.

    If you’re enjoying Paid Memberships Pro, would you mind rating it 5-stars to help spread the word? https://wordpress.org/support/plugin/paid-memberships-pro/reviews/

    Thread Starter marijegrondman

    (@marijegrondman)

    @strangerstudios

    Thank you for further explaining the funtions of the plugin.
    At first,I’m sorry for my late response, i’ve had some vacation days and a busy start of the year.

    Maybe you’re right, i might need a different plugin for what i’m trying to achieve. Let me explain the goal of the site.
    The owner is a supplier of Dog Treats.
    The treats can only be bought at specific supermarkets.
    Consumers need to see all products including some productinformation, and retailprice.
    Supermarket owners will get a login to order the products.
    Obviously they have a discounted price, and need to see some extra product details.

    I have been searching a lot for a good but simple plugin to use, and thought this was it. Please let me know if i can use your plugin for this functionallity or not. Otherwise when you have any reccomendations, I’d be happy to hear.

    Have a nice day!

    Plugin Support Jarryd Long

    (@jarryd-long)

    I think if you’re looking to use PMPro to apply discounts to those products (and that’s the primary objective), the use of a ‘Wholesale’ plugin such as Wholesale Suite would work better for you.

    This will allow you to set all of your Woo product prices to a ‘public’ price, and if the user that logs in has a ‘wholesale’ role and is a supermarket, they can view the discounted prices and purchase them accordingly.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Maximum 1 product in cart’ is closed to new replies.