This filter will replace the _sku value by replacing a portion of the text string.
Code Example
/**
* Filter WooCommerce SKU Value Filter
*
* Add / in SKU number.
*
* @package WPDataSync
*/
add_filter( 'wp_data_sync__sku_value', 'wp_data_sync__sku_value', 10, 3 );
/**
* WP Data Sync _sku Filter
*
* @param $_sku
* @param $post_id
* @param $data_sync
*
* @return mixed
*/
function wp_data_sync__sku_value( $_sku, $post_id, $data_sync ) {
if ( ! empty( $_sku ) && FALSE !== strpos( $_sku, 'BCO' ) ) {
// Add markup to price
$_sku = str_replace( 'BCO', '/BCO', $_sku );
}
return $_sku;
}
Get Started
-
Starter Plan
$39.00 / monthMore Info- 10,000 Requests/Month
- Unlimited Data Sources
- Unlimited Websites
- Unlimited Users
Basic Plan
$69.00 / monthMore Info- 40,000 Requests/Month
- Unlimited Data Sources
- Unlimited Websites
- Unlimited Users
Professional Plan
$129.00 / monthMore Info- 150,000 Requests/Month
- Unlimited Data Sources
- Unlimited Websites
- Unlimited Users
Data Source Mapping
$149.00 – $999.00More Info This product has multiple variants. The options may be chosen on the product pageLet us do the mapping for you!!We will map all your data sources for you, so you can move on to other projects that demand your time. One of our experts will map up to 50 fields for you in each data source.