'publish', 'post_type' => 'download', 'posts_per_page' => -1, 'fields' => 'ids', ); $all_downloads = get_posts( $args ); foreach ( $all_downloads as $download_id ) { // Get the download's data $the_download = new EDD_Download( $download_id ); $has_variable_prices = $the_download->has_variable_prices(); // Proceed only if the download has variable prices if ( true === $has_variable_prices ) { // Get the download's variable price data $variable_prices = get_post_meta( $download_id, 'edd_variable_prices', true ); // Set new labels for the download's variable prices $variable_prices[1]['name'] = 'First New Option Name'; /* Price ID 1: (new) Option Name */ $variable_prices[2]['name'] = 'Second New Option Name'; /* Price ID 2: (new) Option Name */ // $variable_prices[3]['name'] = 'Third Option Here'; /* Price ID 3: (new) Option Name */ // $variable_prices[4]['name'] = 'Fourth Option Here'; /* Price ID 4: (new) Option Name */ // etc. /** * OPTIONAL: Set new descriptions for variable pricing (Variable Pricing Descriptions extension) * https://easydigitaldownloads.com/downloads/edd-variable-pricing-descriptions/ * * If you do not use this extension, comment out the two lines below by adding // at the start of the lines */ $variable_prices[1]['description'] = 'First New Option Description'; /* Price ID 1: (new) Option Description */ $variable_prices[2]['description'] = 'Second New Option Description'; /* Price ID 2: (new) Option Description */ // $variable_prices[3]['description'] = 'Third Option Description'; /* Price ID 3: (new) Option Description */ // $variable_prices[4]['description'] = 'Fourth Option Description'; /* Price ID 4: (new) Option Description */ // etc. // Update the download's variable price data update_post_meta( $download_id, 'edd_variable_prices', $variable_prices ); } } } // Run it! sd_bulk_edit_variable_pricing_labels();