• Resolved wattsyourwebsite

    (@wattsyourwebsite)


    I have recently updated the plugin to Version 3.0.6 and some code I wrote has stopped working. I programmatically create Products in bulk and they need to default to expire by changing the Product Category. It was working fine previously.

    We are using WordPress 6.2.2, WooCommerce 7.9.0 and PHP 7.4.33

    The code is:

    if (function_exists('postExpirator_init')) {
        $prod_cats = [$past_categoryId];
        $options   = [
            'expireType' => 'category',
            'id'         => $postID,
            'category'   => $prod_cats,
            'categoryTaxonomy' => 'product_cat'
    
        ];
    
        $timeStamp = date('U', strtotime($expiration_date_str));
    
        $tempstr=date('d/m/Y H:i:s', $timeStamp);
        _scheduleExpiratorEvent($postID, $timeStamp, $options);
    } 

    Any guidance would be most appreciated.

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

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

The topic ‘Expirator code no longer works’ is closed to new replies.