Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. add_action( 'woocommerce_admin_process_product_object', 'update_download_acf', 10, 1 );
  2.  
  3. function update_download_acf( $product ) {
  4. if( $download_acf = get_field( 'download', $product->get_id() ) )
  5. $product->set_customer_available_downloads( $download_acf );
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement