• Resolved yacine84

    (@yacine84)


    Hi
    How I can change all TVA Status (to taxable ) with PHP code?or other configuration for 50,000 products? ?
    Thanks

    • This topic was modified 2 months ago by yacine84.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @yacine84

    Is this the same issue you resolved on your other thread here?

    Looking forward to hearing from you!

    Thread Starter yacine84

    (@yacine84)

    Hi

     To change all TVA Status + 1000 products :

    Go to the WordPress dashboard,

    go to Appearance > Theme Editor and find the functions.php file (section on the right)

    add code :

    function update_tva_status() {
    $args = array(
    'post_type' => 'product',
    'posts_per_page' => -1,
    'fields' => 'ids',
    );
    $products = get_posts($args);

    foreach ($products as $product_id) {
    update_post_meta($product_id, '_tax_status', 'taxable');
    }
    }
    add_action('init', 'update_tva_status');

    >>> Is this the same issue you resolved on your other thread here?

    NO, this one is to apply the modifications

    Resolved, Thanks

    • This reply was modified 2 months ago by yacine84.
    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @yacine84

    I’m glad you were able to find a solution to your inquiry here and thanks for sharing it with the community too! ??

    Should you have further inquiries, kindly create a new topic here.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.