WooCommerce 教程:[解决] Shipstation 插件坏了

WooCommerce 教程:[解决] Shipstation 插件坏了

我曾与使用 Shipstation 插件的客户合作。更新到最新版本的 WooCommerce(2.2)后,插件停止工作,其 “设置” 下的选项卡无法单击。在顶部,一些下拉菜单被破坏了。这是修复,希望 Shipstation 更新插件 asap 。

修复 1:在 WooCommerce 2.2 中使 Shipstation 选项卡可以点击


// Look for "woocommerce" and change it to "wc-settings" in the function below

function tab() {
	$class = 'nav-tab';
	if ( $this->current_tab == 'woo_ss' ) $class .= ' nav-tab-active';
	echo '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=woo_ss' ) . '" class="' . $class . '">ShipStation</a>';
}

修复 2:修复 WooCommerce 2.2 中的 Shipstation“导入” 下拉菜单


// Look for "options > array" and instead of the current value enter order statuses manually

'name' => __( 'Order Status to move it to when the shipnotify action is presented', $this->domain ),
		'desc' => '',
		'tip' => '',
		'id' => 'woo_ss_import_status',
		'css' => '',
		'std' => '',
		'type' => 'select',
		'options' => array ( "Pending" => "Pending", "Processing" => "Processing", "Cancelled" => "Cancelled", "Refunded" => "Refunded", "Failed" => "Failed" )

如何添加此代码?

1 、您可以将 PHP 代码片段放置在主题或子主题的 functions.php 文件的底部(如果是 CSS 代码,请添加到子主题的 style.css 文件底部)修改之前建议先备份原始文件,若出现错误请先删除此代码。

2 、 WordPress 4.9 后改进了主题编辑器,对于 CSS 代码也可打开网站前台编辑器的【自定义】,复制代码添加到自定义 css 中。

此代码是否可用?

如需帮助或是您有更好的方案想分享?请到薇晓朵 WooCommerce 中文论坛留言告知,我们希望可以帮到更多国内的 WooCommerce 用户也希望您的参与。

文章没看懂?代码不会用?需要帮助您可以去论坛提问自助服务台

作者小新

大象、大象 ,你的鼻子怎么那么长 ,妈妈说鼻子长才是漂亮 ......