View Categories

WooCommerce:重命名“下订单”按钮@结帐

< 1 min read

仿牌独立站出海专家
PHP Snippet Alternative 1:重命名“下订单”按钮@ WooCommerce Checkout


add_filter( 'woocommerce_order_button_text', 'bbloomer_rename_place_order_button', 9999 );
  
function bbloomer_rename_place_order_button() {
   return 'Continue'; 
}

PHP Snippet Alternative 2:重命名“下订单”按钮@ WooCommerce Checkout
如果以上代码段均无效,请尝试使用此代码段。请注意:您必须在3个地方输入按钮名称,请参阅下面的所有大写字母。


add_filter( 'woocommerce_order_button_html', 'bbloomer_rename_place_order_button_alt', 9999 );
  
function bbloomer_rename_place_order_button_alt() {
   return '<button type="submit" class="button alt" name="woocommerce_checkout_place_order" id="place_order" value="CONTINUE" data-value="CONTINUE">CONTINUE</button>';
}