• Resolved rainerd

    (@coresince84)


    Hey there,
    is there a hook or something to change position of the stock alert box? I simply want to move it above the disabled “Add to cart” button.
    Thanks and best regards,
    Rainer

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    Sorry for the delay response –
    Kindly Add below code to your function.php of your active theme
    Then change the priority as per your requirement

    add_action('init', 'chnage_alert_box_position');
    function chnage_alert_box_position(){
    global $WOO_Product_Stock_Alert;
     remove_action('woocommerce_single_product_summary', array($WOO_Product_Stock_Alert->frontend, 'get_alert_form'), 30);
     add_action('woocommerce_single_product_summary', array($WOO_Product_Stock_Alert->frontend, 'get_alert_form'), 50); // change the priority of this hook to change the position
    }

    Regards,

    Thread Starter rainerd

    (@coresince84)

    Thanks! Will give it a try ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Position’ is closed to new replies.