• I have a client that has been using the plugin for a while without incident.
    Since updating the plugin last week to version 5.0.0, my client can no longer remove all the options from certain products.

    Example, he has a product that had no optional extras and decides to add 3 via the plugin, they get added fine. If he then tries to remove them all, one optional extra remains and is not removed. If he then tries to remove the remaining extra, it appears to be removed but is then re-added when the product is updated.
    I have checked the settings of the plugin, and the default products are set to “None”, so even if it went to default products, there should be nothing showing.

    This issue has only become apparent since the update to 5.0.0; can someone please explain how we can remove the extras entirely from a product?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @clnetbop,

    Can you send us the back-end settings and front-end issue of  the product with related product link to check and help you?

    Regards,

    Thread Starter clnetbop

    (@clnetbop)

    Hi @miemie – please see below for screenshots of the settings:

    https://we.tl/t-rcFU70WhsT

    In the function:

    process_product_meta

    If this $_POST is not set, this update does not work:

    if ( isset( $_POST['woobt_ids'] ) ) {
    
    update_post_meta( $post_id, 'woobt_ids', self::sanitize_array( $_POST['woobt_ids'] ) );

    So I have added this and it works again:

    if ( isset( $_POST['woobt_ids'] ) ) {
    						update_post_meta( $post_id, 'woobt_ids', self::sanitize_array( $_POST['woobt_ids'] ) );
    					}
    					else{
    						delete_post_meta( $post_id, 'woobt_ids' );
    					}
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to remove all options’ is closed to new replies.