当用户在购物车页面点击“继续结帐”时,我想将他发送到自定义 URL。我在functions.php中使用了这个过滤器
add_filter('woocommerce_get_checkout_url', 'dj_redirect_checkout');
function dj_redirect_checkout($url) {
global $woocommerce;
$checkout_url = 'http://my-custom-url.com';
return $checkout_url;
}
Run Code Online (Sandbox Code Playgroud)
但是,在这种情况下,此过滤器也会在结帐页面上触发,我想在购物车页面上以及单击“继续结帐”后触发它。
请指教。
谢谢你,
Is it possible to write urls to .xlsx file via XLSXwriter as a plain text (without hyperlinks)? I mean, when I write urls, they are inserted as visible part and hyperlink. I would like to avoid hyperlink and leave url as a simple text string without any formatting
Here is my code:
b = xlsxwriter.Workbook(fn+'_'+time.strftime('%d.%m.%Y_%H-%M-%S')+'.xlsx')
s = b.add_worksheet()
s.set_zoom(125)
s.set_column('A:K', 30)
format = b.add_format({'align': 'left', 'font_name': 'Arial', 'font_size': 10})
s.write_row(0, 0, head, format)
for i in range(len(cols)):
s.write_column(1, i, cols[i], …Run Code Online (Sandbox Code Playgroud)