芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/www/wp-content/plugins/facebook-for-woocommerce/includes/Admin/Products.php
get_facebook_category_handler(); $enhanced_attribute_fields = new Enhanced_Catalog_Attribute_Fields( Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_PRODUCT, null, $product ); if ( empty( $category_id ) || ( $category_handler->is_category( $category_id ) && $category_handler->is_root_category( $category_id ) ) ) { // show nothing return; } ?>
render( $category_id ); ?> render( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>
$label ) { foreach ( $words as $word ) { if ( Helper::str_exists( wc_strtolower( $label ), $word ) || Helper::str_exists( wc_strtolower( $name ), $word ) ) { $attributes[ $name ] = $label; } } } return $attributes; } /** * Gets a indexed list of available product attributes with the name of the attribute as key and the label as the value. * * @since 2.1.0 * * @param \WC_Product $product the product object * @return array */ public static function get_available_product_attribute_names( \WC_Product $product ) { return array_map( function ( $attribute ) use ( $product ) { return wc_attribute_label( $attribute->get_name(), $product ); }, Products_Handler::get_available_product_attributes( $product ) ); } /** * Saves the Commerce settings. * * @internal * * @since 2.1.0 * * @param \WC_Product $product product object */ public static function save_commerce_fields( \WC_Product $product ) { $commerce_enabled = wc_string_to_bool( Helper::get_posted_value( self::FIELD_COMMERCE_ENABLED ) ); $google_product_category_id = wc_clean( Helper::get_posted_value( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ) ); $enhanced_catalog_attributes = Products_Handler::get_enhanced_catalog_attributes_from_request(); foreach ( $enhanced_catalog_attributes as $key => $value ) { Products_Handler::update_product_enhanced_catalog_attribute( $product, $key, $value ); } if ( ! isset( $enhanced_catalog_attributes[ Enhanced_Catalog_Attribute_Fields::OPTIONAL_SELECTOR_KEY ] ) ) { // This is a checkbox so won't show in the post data if it's been unchecked, // hence if it's unset we should clear the term meta for it. Products_Handler::update_product_enhanced_catalog_attribute( $product, Enhanced_Catalog_Attribute_Fields::OPTIONAL_SELECTOR_KEY, null ); } if ( Products_Handler::get_google_product_category_id( $product ) !== $google_product_category_id ) { Products_Handler::update_google_product_category_id( $product, $google_product_category_id ); } } }