rv_woo_add_custom_general_fields

The Woocommerce Add-to-Cart Custom Redirect rv woo add custom general fields function.

Description

rv_woo_add_custom_general_fields(); 

Usage

  1. if ( !function_exists( 'rv_woo_add_custom_general_fields' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-add-to-cart-custom-redirect/woocommerce-custom-redirect.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = rv_woo_add_custom_general_fields(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/woocommerce-custom-redirect.php  
  1. function rv_woo_add_custom_general_fields() { 
  2.  
  3. global $post_id, $woocommerce, $post; 
  4.  
  5. echo '<div class="options_group">'; 
  6.  
  7. woocommerce_wp_text_input( 
  8.  
  9. array( 
  10. 'id' => '_rv_woo_product_custom_redirect_url',  
  11. 'label' => __( 'Redirect on Add to Cart', 'woocommerce' ),  
  12. 'placeholder' => 'http://',  
  13. 'desc_tip' => 'true',  
  14. 'description' => __( 'Enter a URL to redirect the user to after this product is added to the cart.', 'woocommerce' ) ,  
  15. 'value' => get_post_meta( $post_id, '_rv_woo_product_custom_redirect_url', true ) 
  16.  
  17. ); 
  18.  
  19. echo '</div>'; 
  20.