添加到购物车后移动对象

时间:2020-06-07 16:36:44

标签: woocommerce webhooks stock

我正在使用一个插件来通知客户产品何时有库存,但通知者位于我要移动的页面上的位置很差。

我是php的新手,所以我在“ echo”部分遇到了问题

add_action ( 'woocommerce_after_add_to_cart_form', 'out_of_stock' );
function out_of_stock() {
    global $product;
    $product_type = $product->get_type();
    if (is_product() && $product_type == 'simple' && $product->is_on_backorder(1)) {
        $obj = new Instock_Notifier_Product();
        echo $obj->#form-variation-id-11877 ($product);
    }
}

这不起作用。我需要调用此插件,该插件具有此信息,但是我无法输入正确的代码

<form id="form-variation-id-11877" data-variation-id="11877" class="in-stock-form" action="" style=""><a class="instock-notify notify-btn instock-hidden" href="#"><i class="fas fa-bell"></i>

有人可以帮我吗?

谢谢!

0 个答案:

没有答案