File manager - Edit - /home/proidvn/me.proid.vn/wp-content/plugins/wp-all-export-pro/src/App/Field/ShippingWeight.php
Back
<?php namespace Wpae\App\Field; class ShippingWeight extends Field { const SECTION = 'shipping'; public function getValue($snippetData) { $shippingData = $this->feed->getSectionFeedData(self::SECTION); if($shippingData['weight'] == 'useWooCommerceProductValues') { $product = wc_get_product($this->entry->ID); $weightUnit = get_option('woocommerce_weight_unit'); $weight = $product->get_weight(); if($weight) { return $weight . ' ' . $weightUnit; } else { return ''; } } else { if(isset($shippingData['weightCV'])) { return $this->replaceSnippetsInValue($shippingData['weightCV'], $snippetData); } else { return ''; } } } public function getFieldName() { return 'shipping_weight'; } }
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Generation time: 0.12 |
proxy
|
phpinfo
|
Settings