service( 'options' )->get( 'status', '' ); // Bail early, in case settings status is not enabled. if ( ! wc_string_to_bool( $status ) ) { return array(); } // Enqueue the frontend styles. wp_enqueue_style( 'woo-additional-terms' ); return array( 'is_required' => wc_string_to_bool( woo_additional_terms()->service( 'options' )->get( 'required', 'no' ) ), 'display_action' => woo_additional_terms()->service( 'options' )->get( 'action', 'embed' ), 'page_content' => woo_additional_terms()->service( 'terms' )->get( 'content' ), 'checkbox_label' => woo_additional_terms()->service( 'terms' )->get( 'label' ), 'error_message' => woo_additional_terms()->service( 'terms' )->get( 'error' ), ); } /** * Get the file modified time as a cache buster if we're in dev mode. * * @since 1.5.0 * * @param string $file Local path to the file. * * @return string */ protected function get_file_version( $file ) { if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG && file_exists( $file ) ) { return filemtime( $file ); } return woo_additional_terms()->get_version(); } }